Permalink
Browse files

Upgrade V8 to 3.0.9

1 parent e6e6e87 commit b8f006ef72bb518397483d5b43111ddbcff250c8 @ry ry committed Jan 19, 2011
Showing with 4,604 additions and 2,076 deletions.
  1. +9 −1 deps/v8/ChangeLog
  2. +1 −1 deps/v8/LICENSE
  3. +19 −1 deps/v8/SConstruct
  4. +3 −0 deps/v8/src/SConscript
  5. +8 −0 deps/v8/src/arm/assembler-arm.cc
  6. +4 −2 deps/v8/src/arm/assembler-arm.h
  7. +6 −2 deps/v8/src/arm/ic-arm.cc
  8. +8 −5 deps/v8/src/arm/lithium-arm.cc
  9. +11 −1 deps/v8/src/arm/lithium-arm.h
  10. +24 −9 deps/v8/src/arm/lithium-codegen-arm.cc
  11. +38 −16 deps/v8/src/arm/stub-cache-arm.cc
  12. +10 −0 deps/v8/src/assembler.cc
  13. +27 −1 deps/v8/src/assembler.h
  14. +7 −2 deps/v8/src/builtins.cc
  15. +2 −0 deps/v8/src/code-stubs.cc
  16. +11 −0 deps/v8/src/codegen.cc
  17. +11 −1 deps/v8/src/compiler.cc
  18. +7 −3 deps/v8/src/compiler.h
  19. +8 −0 deps/v8/src/flag-definitions.h
  20. +1 −0 deps/v8/src/frames.cc
  21. +11 −0 deps/v8/src/full-codegen.cc
  22. +1,170 −0 deps/v8/src/gdb-jit.cc
  23. +136 −0 deps/v8/src/gdb-jit.h
  24. +2 −1 deps/v8/src/hydrogen-instructions.cc
  25. +18 −0 deps/v8/src/hydrogen-instructions.h
  26. +11 −2 deps/v8/src/hydrogen.cc
  27. +3 −0 deps/v8/src/hydrogen.h
  28. +9 −3 deps/v8/src/ia32/ic-ia32.cc
  29. +131 −332 deps/v8/src/ia32/lithium-codegen-ia32.cc
  30. +16 −28 deps/v8/src/ia32/lithium-codegen-ia32.h
  31. +461 −0 deps/v8/src/ia32/lithium-gap-resolver-ia32.cc
  32. +110 −0 deps/v8/src/ia32/lithium-gap-resolver-ia32.h
  33. +67 −78 deps/v8/src/ia32/lithium-ia32.cc
  34. +501 −563 deps/v8/src/ia32/lithium-ia32.h
  35. +35 −14 deps/v8/src/ia32/stub-cache-ia32.cc
  36. +209 −100 deps/v8/src/ic.cc
  37. +13 −0 deps/v8/src/ic.h
  38. +63 −0 deps/v8/src/inspector.cc
  39. +62 −0 deps/v8/src/inspector.h
  40. +6 −6 deps/v8/src/lithium-allocator.cc
  41. +35 −13 deps/v8/src/lithium-allocator.h
  42. +11 −8 deps/v8/src/lithium.cc
  43. +0 −3 deps/v8/src/lithium.h
  44. +12 −0 deps/v8/src/mark-compact.cc
  45. +7 −6 deps/v8/src/objects-debug.cc
  46. +45 −4 deps/v8/src/objects-inl.h
  47. +93 −69 deps/v8/src/objects.h
  48. +1 −1 deps/v8/src/platform-win32.cc
  49. +1 −1 deps/v8/src/preparse-data.h
  50. +1 −0 deps/v8/src/runtime-profiler.cc
  51. +58 −54 deps/v8/src/runtime.cc
  52. +2 −3 deps/v8/src/scopeinfo.cc
  53. +54 −8 deps/v8/src/scopes.cc
  54. +125 −46 deps/v8/src/stub-cache.cc
  55. +11 −7 deps/v8/src/stub-cache.h
  56. +29 −0 deps/v8/src/third_party/strongtalk/LICENSE
  57. +18 −0 deps/v8/src/third_party/strongtalk/README.chromium
  58. +13 −2 deps/v8/src/type-info.cc
  59. +6 −0 deps/v8/src/type-info.h
  60. +1 −1 deps/v8/src/version.cc
  61. +6 −0 deps/v8/src/x64/assembler-x64.cc
  62. +1 −1 deps/v8/src/x64/assembler-x64.h
  63. +1 −0 deps/v8/src/x64/code-stubs-x64.h
  64. +4 −2 deps/v8/src/x64/deoptimizer-x64.cc
  65. +1 −1 deps/v8/src/x64/frames-x64.h
  66. +6 −2 deps/v8/src/x64/ic-x64.cc
  67. +108 −36 deps/v8/src/x64/lithium-codegen-x64.cc
  68. +77 −33 deps/v8/src/x64/lithium-x64.cc
  69. +508 −567 deps/v8/src/x64/lithium-x64.h
  70. +46 −17 deps/v8/src/x64/stub-cache-x64.cc
  71. +6 −4 deps/v8/test/cctest/cctest.status
  72. +61 −0 deps/v8/test/mjsunit/compiler/regress-serialized-slots.js
  73. +3 −0 deps/v8/test/mjsunit/mjsunit.status
  74. +0 −13 deps/v8/test/mozilla/mozilla.status
  75. +4 −2 deps/v8/tools/gyp/v8.gyp
View
@@ -1,7 +1,15 @@
+2011-01-19: Version 3.0.9
+
+ Added basic GDB JIT Interface integration.
+
+ Make invalid break/continue statements a syntax error instead of a
+ runtime error.
+
+
2011-01-17: Version 3.0.8
Exposed heap size limit to the heap statistics gathered by
- the GetHeapStatistics API.
+ the GetHeapStatistics API.
Wrapped external pointers more carefully (issue 1037).
View
@@ -24,7 +24,7 @@ are:
These libraries have their own licenses; we recommend you read them,
as their terms may differ from the terms below.
-Copyright 2006-2009, Google Inc. All rights reserved.
+Copyright 2006-2011, the V8 project authors. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
View
@@ -124,12 +124,15 @@ LIBRARY_FLAGS = {
},
'debuggersupport:on': {
'CPPDEFINES': ['ENABLE_DEBUGGER_SUPPORT'],
+ },
+ 'inspector:on': {
+ 'CPPDEFINES': ['INSPECTOR'],
}
},
'gcc': {
'all': {
'CCFLAGS': ['$DIALECTFLAGS', '$WARNINGFLAGS'],
- 'CXXFLAGS': ['$CCFLAGS', '-fno-rtti', '-fno-exceptions', '-fno-builtin-memcpy'],
+ 'CXXFLAGS': ['$CCFLAGS', '-fno-rtti', '-fno-exceptions'],
},
'visibility:hidden': {
# Use visibility=default to disable this.
@@ -229,6 +232,9 @@ LIBRARY_FLAGS = {
},
'prof:oprofile': {
'CPPDEFINES': ['ENABLE_OPROFILE_AGENT']
+ },
+ 'gdbjit:on': {
+ 'CPPDEFINES': ['ENABLE_GDB_JIT_INTERFACE']
}
},
'msvc': {
@@ -705,6 +711,11 @@ SIMPLE_OPTIONS = {
'default': 'off',
'help': 'enable profiling of build target'
},
+ 'gdbjit': {
+ 'values': ['on', 'off'],
+ 'default': 'off',
+ 'help': 'enable GDB JIT interface'
+ },
'library': {
'values': ['static', 'shared'],
'default': 'static',
@@ -735,6 +746,11 @@ SIMPLE_OPTIONS = {
'default': 'on',
'help': 'enable debugging of JavaScript code'
},
+ 'inspector': {
+ 'values': ['on', 'off'],
+ 'default': 'off',
+ 'help': 'enable inspector features'
+ },
'soname': {
'values': ['on', 'off'],
'default': 'off',
@@ -871,6 +887,8 @@ def VerifyOptions(env):
return False
if env['os'] == 'win32' and env['library'] == 'shared' and env['prof'] == 'on':
Abort("Profiling on windows only supported for static library.")
+ if env['gdbjit'] == 'on' and (env['os'] != 'linux' or (env['arch'] != 'ia32' and env['arch'] != 'x64')):
+ Abort("GDBJIT interface is supported only for Intel-compatible (ia32 or x64) Linux target.")
if env['prof'] == 'oprofile' and env['os'] != 'linux':
Abort("OProfile is only supported on Linux.")
if env['os'] == 'win32' and env['soname'] == 'on':
@@ -71,6 +71,7 @@ SOURCES = {
frames.cc
full-codegen.cc
func-name-inferrer.cc
+ gdb-jit.cc
global-handles.cc
fast-dtoa.cc
fixed-dtoa.cc
@@ -81,6 +82,7 @@ SOURCES = {
hydrogen.cc
hydrogen-instructions.cc
ic.cc
+ inspector.cc
interpreter-irregexp.cc
jsregexp.cc
jump-target.cc
@@ -190,6 +192,7 @@ SOURCES = {
ia32/ic-ia32.cc
ia32/jump-target-ia32.cc
ia32/lithium-codegen-ia32.cc
+ ia32/lithium-gap-resolver-ia32.cc
ia32/lithium-ia32.cc
ia32/macro-assembler-ia32.cc
ia32/regexp-macro-assembler-ia32.cc
@@ -2495,13 +2495,21 @@ void Assembler::GrowBuffer() {
void Assembler::db(uint8_t data) {
+ // No relocation info should be pending while using db. db is used
+ // to write pure data with no pointers and the constant pool should
+ // be emitted before using db.
+ ASSERT(num_prinfo_ == 0);
CheckBuffer();
*reinterpret_cast<uint8_t*>(pc_) = data;
pc_ += sizeof(uint8_t);
}
void Assembler::dd(uint32_t data) {
+ // No relocation info should be pending while using dd. dd is used
+ // to write pure data with no pointers and the constant pool should
+ // be emitted before using dd.
+ ASSERT(num_prinfo_ == 0);
CheckBuffer();
*reinterpret_cast<uint32_t*>(pc_) = data;
pc_ += sizeof(uint32_t);
@@ -1240,8 +1240,10 @@ class Assembler : public Malloced {
// Use --code-comments to enable.
void RecordComment(const char* msg);
- // Writes a single byte or word of data in the code stream. Used for
- // inline tables, e.g., jump-tables.
+ // Writes a single byte or word of data in the code stream. Used
+ // for inline tables, e.g., jump-tables. The constant pool should be
+ // emitted before any use of db and dd to ensure that constant pools
+ // are not emitted as part of the tables generated.
void db(uint8_t data);
void dd(uint32_t data);
@@ -542,8 +542,12 @@ static void GenerateMonomorphicCacheProbe(MacroAssembler* masm,
Label number, non_number, non_string, boolean, probe, miss;
// Probe the stub cache.
- Code::Flags flags =
- Code::ComputeFlags(kind, NOT_IN_LOOP, MONOMORPHIC, NORMAL, argc);
+ Code::Flags flags = Code::ComputeFlags(kind,
+ NOT_IN_LOOP,
+ MONOMORPHIC,
+ Code::kNoExtraICState,
+ NORMAL,
+ argc);
StubCache::GenerateProbe(masm, flags, r1, r2, r3, r4, r5);
// If the stub cache probing failed, the receiver might be a value.
@@ -576,6 +576,13 @@ LOperand* LChunkBuilder::UseRegisterOrConstantAtStart(HValue* value) {
}
+LOperand* LChunkBuilder::UseAny(HValue* value) {
+ return value->IsConstant()
+ ? chunk_->DefineConstantOperand(HConstant::cast(value))
+ : Use(value, new LUnallocated(LUnallocated::ANY));
+}
+
+
LOperand* LChunkBuilder::Use(HValue* value, LUnallocated* operand) {
if (value->EmitAtUses()) {
HInstruction* instr = HInstruction::cast(value);
@@ -907,11 +914,7 @@ LEnvironment* LChunkBuilder::CreateEnvironment(HEnvironment* hydrogen_env) {
} else if (value->IsPushArgument()) {
op = new LArgument(argument_index++);
} else {
- op = UseOrConstant(value);
- if (op->IsUnallocated()) {
- LUnallocated* unalloc = LUnallocated::cast(op);
- unalloc->set_policy(LUnallocated::ANY);
- }
+ op = UseAny(value);
}
result->AddValue(op, value->representation());
}
@@ -1887,15 +1887,25 @@ class LChunkBuilder BASE_EMBEDDED {
LOperand* UseRegister(HValue* value);
LOperand* UseRegisterAtStart(HValue* value);
- // A value in a register that may be trashed.
+ // An input operand in a register that may be trashed.
LOperand* UseTempRegister(HValue* value);
+
+ // An input operand in a register or stack slot.
LOperand* Use(HValue* value);
LOperand* UseAtStart(HValue* value);
+
+ // An input operand in a register, stack slot or a constant operand.
LOperand* UseOrConstant(HValue* value);
LOperand* UseOrConstantAtStart(HValue* value);
+
+ // An input operand in a register or a constant operand.
LOperand* UseRegisterOrConstant(HValue* value);
LOperand* UseRegisterOrConstantAtStart(HValue* value);
+ // An input operand in register, stack slot or a constant operand.
+ // Will not be moved to a register even if one is freely available.
+ LOperand* UseAny(HValue* value);
+
// Methods for setting up define-use relationships.
// Return the same instruction that they are passed.
LInstruction* Define(LInstruction* instr, LUnallocated* result);
@@ -172,13 +172,13 @@ bool LGapResolver::CanReach(LGapNode* a, LGapNode* b) {
void LGapResolver::RegisterMove(LMoveOperands move) {
- if (move.from()->IsConstantOperand()) {
+ if (move.source()->IsConstantOperand()) {
// Constant moves should be last in the machine code. Therefore add them
// first to the result set.
- AddResultMove(move.from(), move.to());
+ AddResultMove(move.source(), move.destination());
} else {
- LGapNode* from = LookupNode(move.from());
- LGapNode* to = LookupNode(move.to());
+ LGapNode* from = LookupNode(move.source());
+ LGapNode* to = LookupNode(move.destination());
if (to->IsAssigned() && to->assigned_from() == from) {
move.Eliminate();
return;
@@ -341,6 +341,11 @@ bool LCodeGen::GenerateDeferredCode() {
__ jmp(code->exit());
}
+ // Force constant pool emission at the end of deferred code to make
+ // sure that no constant pools are emitted after the official end of
+ // the instruction sequence.
+ masm()->CheckConstPool(true, false);
+
// Deferred code is the last part of the instruction sequence. Mark
// the generated code as done unless we bailed out.
if (!is_aborted()) status_ = DONE;
@@ -816,8 +821,8 @@ void LCodeGen::DoParallelMove(LParallelMove* move) {
resolver_.Resolve(move->move_operands(), &marker_operand);
for (int i = moves->length() - 1; i >= 0; --i) {
LMoveOperands move = moves->at(i);
- LOperand* from = move.from();
- LOperand* to = move.to();
+ LOperand* from = move.source();
+ LOperand* to = move.destination();
ASSERT(!from->IsDoubleRegister() ||
!ToDoubleRegister(from).is(dbl_scratch));
ASSERT(!to->IsDoubleRegister() || !ToDoubleRegister(to).is(dbl_scratch));
@@ -999,7 +1004,6 @@ void LCodeGen::DoUnknownOSRValue(LUnknownOSRValue* instr) {
void LCodeGen::DoModI(LModI* instr) {
- Abort("ModI not implemented");
class DeferredModI: public LDeferredCode {
public:
DeferredModI(LCodeGen* codegen, LModI* instr)
@@ -1055,7 +1059,6 @@ void LCodeGen::DoModI(LModI* instr) {
void LCodeGen::DoDivI(LDivI* instr) {
- Abort("DivI not implemented");
class DeferredDivI: public LDeferredCode {
public:
DeferredDivI(LCodeGen* codegen, LDivI* instr)
@@ -1293,7 +1296,10 @@ void LCodeGen::DoConstantI(LConstantI* instr) {
void LCodeGen::DoConstantD(LConstantD* instr) {
- Abort("DoConstantD unimplemented.");
+ ASSERT(instr->result()->IsDoubleRegister());
+ DwVfpRegister result = ToDoubleRegister(instr->result());
+ double v = instr->value();
+ __ vmov(result, v);
}
@@ -2336,6 +2342,15 @@ void LCodeGen::DoMathFloor(LUnaryMathOperation* instr) {
// Move the result back to general purpose register r0.
__ vmov(result, single_scratch);
+
+ // Test for -0.
+ Label done;
+ __ cmp(result, Operand(0));
+ __ b(ne, &done);
+ __ vmov(scratch, input.high());
+ __ tst(scratch, Operand(HeapNumber::kSignMask));
+ DeoptimizeIf(ne, instr->environment());
+ __ bind(&done);
}
Oops, something went wrong. Retry.

0 comments on commit b8f006e

Please sign in to comment.