OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 6188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6199 // backpatching it with the spill slot operands. | 6199 // backpatching it with the spill slot operands. |
6200 DCHECK(!environment->HasBeenRegistered()); | 6200 DCHECK(!environment->HasBeenRegistered()); |
6201 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); | 6201 RegisterEnvironmentForDeoptimization(environment, Safepoint::kNoLazyDeopt); |
6202 | 6202 |
6203 GenerateOsrPrologue(); | 6203 GenerateOsrPrologue(); |
6204 } | 6204 } |
6205 | 6205 |
6206 | 6206 |
6207 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { | 6207 void LCodeGen::DoForInPrepareMap(LForInPrepareMap* instr) { |
6208 DCHECK(ToRegister(instr->context()).is(esi)); | 6208 DCHECK(ToRegister(instr->context()).is(esi)); |
6209 __ cmp(eax, isolate()->factory()->undefined_value()); | |
6210 DeoptimizeIf(equal, instr, Deoptimizer::kUndefined); | |
6211 | |
6212 __ cmp(eax, isolate()->factory()->null_value()); | |
6213 DeoptimizeIf(equal, instr, Deoptimizer::kNull); | |
6214 | |
6215 __ test(eax, Immediate(kSmiTagMask)); | 6209 __ test(eax, Immediate(kSmiTagMask)); |
6216 DeoptimizeIf(zero, instr, Deoptimizer::kSmi); | 6210 DeoptimizeIf(zero, instr, Deoptimizer::kSmi); |
6217 | 6211 |
6218 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); | 6212 STATIC_ASSERT(FIRST_JS_PROXY_TYPE == FIRST_SPEC_OBJECT_TYPE); |
6219 __ CmpObjectType(eax, LAST_JS_PROXY_TYPE, ecx); | 6213 __ CmpObjectType(eax, LAST_JS_PROXY_TYPE, ecx); |
6220 DeoptimizeIf(below_equal, instr, Deoptimizer::kWrongInstanceType); | 6214 DeoptimizeIf(below_equal, instr, Deoptimizer::kWrongInstanceType); |
6221 | 6215 |
6222 Label use_cache, call_runtime; | 6216 Label use_cache, call_runtime; |
6223 __ CheckEnumCache(&call_runtime); | 6217 __ CheckEnumCache(&call_runtime); |
6224 | 6218 |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6352 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6346 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
6353 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6347 RecordSafepoint(Safepoint::kNoLazyDeopt); |
6354 } | 6348 } |
6355 | 6349 |
6356 | 6350 |
6357 #undef __ | 6351 #undef __ |
6358 | 6352 |
6359 } } // namespace v8::internal | 6353 } } // namespace v8::internal |
6360 | 6354 |
6361 #endif // V8_TARGET_ARCH_X87 | 6355 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |