diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2010-12-17 09:29:19 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-12-17 09:47:55 -0800 |
commit | 7d425a0a160e65b357ed1ad8b35dc01855b5f479 (patch) | |
tree | 5d1c940b27eeea7bbe420361e667ad7304b84a33 /deps/v8/src/ic.cc | |
parent | 9eaf2329e7d1e7c2de20ab7e4461bf55b18595c2 (diff) | |
download | node-new-7d425a0a160e65b357ed1ad8b35dc01855b5f479.tar.gz |
Upgrade V8 to 3.0.3
Diffstat (limited to 'deps/v8/src/ic.cc')
-rw-r--r-- | deps/v8/src/ic.cc | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/deps/v8/src/ic.cc b/deps/v8/src/ic.cc index cda0b1504a..645c6fdcf6 100644 --- a/deps/v8/src/ic.cc +++ b/deps/v8/src/ic.cc @@ -1951,7 +1951,7 @@ TRBinaryOpIC::State TRBinaryOpIC::ToState(TypeInfo type_info) { TRBinaryOpIC::TypeInfo TRBinaryOpIC::JoinTypes(TRBinaryOpIC::TypeInfo x, - TRBinaryOpIC::TypeInfo y) { + TRBinaryOpIC::TypeInfo y) { if (x == UNINITIALIZED) return y; if (y == UNINITIALIZED) return x; if (x == STRING && y == STRING) return STRING; @@ -2041,6 +2041,11 @@ MaybeObject* TypeRecordingBinaryOp_Patch(Arguments args) { TRBinaryOpIC::GetName(result_type), Token::Name(op)); } + + // Activate inlined smi code. + if (previous_type == TRBinaryOpIC::UNINITIALIZED) { + PatchInlinedSmiCode(ic.address()); + } } Handle<JSBuiltinsObject> builtins = Top::builtins(); @@ -2127,13 +2132,17 @@ const char* CompareIC::GetStateName(State state) { } -CompareIC::State CompareIC::TargetState(Handle<Object> x, Handle<Object> y) { - State state = GetState(); - if (state != UNINITIALIZED) return GENERIC; - if (x->IsSmi() && y->IsSmi()) return SMIS; - if (x->IsNumber() && y->IsNumber()) return HEAP_NUMBERS; +CompareIC::State CompareIC::TargetState(State state, + bool has_inlined_smi_code, + Handle<Object> x, + Handle<Object> y) { + if (!has_inlined_smi_code && state != UNINITIALIZED) return GENERIC; + if (state == UNINITIALIZED && x->IsSmi() && y->IsSmi()) return SMIS; + if ((state == UNINITIALIZED || (state == SMIS && has_inlined_smi_code)) && + x->IsNumber() && y->IsNumber()) return HEAP_NUMBERS; if (op_ != Token::EQ && op_ != Token::EQ_STRICT) return GENERIC; - if (x->IsJSObject() && y->IsJSObject()) return OBJECTS; + if (state == UNINITIALIZED && + x->IsJSObject() && y->IsJSObject()) return OBJECTS; return GENERIC; } |