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 #if V8_TARGET_ARCH_X87 | 5 #if V8_TARGET_ARCH_X87 |
6 | 6 |
7 #include "src/code-factory.h" | 7 #include "src/code-factory.h" |
8 #include "src/codegen.h" | 8 #include "src/codegen.h" |
9 #include "src/deoptimizer.h" | 9 #include "src/deoptimizer.h" |
10 #include "src/full-codegen/full-codegen.h" | 10 #include "src/full-codegen/full-codegen.h" |
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
528 __ push(ebp); // Caller's frame pointer. | 528 __ push(ebp); // Caller's frame pointer. |
529 __ mov(ebp, esp); | 529 __ mov(ebp, esp); |
530 __ push(esi); // Callee's context. | 530 __ push(esi); // Callee's context. |
531 __ push(edi); // Callee's JS function. | 531 __ push(edi); // Callee's JS function. |
532 __ push(edx); // Callee's new target. | 532 __ push(edx); // Callee's new target. |
533 | 533 |
534 // Get the bytecode array from the function object (or from the DebugInfo if | 534 // Get the bytecode array from the function object (or from the DebugInfo if |
535 // it is present) and load it into kInterpreterBytecodeArrayRegister. | 535 // it is present) and load it into kInterpreterBytecodeArrayRegister. |
536 __ mov(eax, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); | 536 __ mov(eax, FieldOperand(edi, JSFunction::kSharedFunctionInfoOffset)); |
537 Label load_debug_bytecode_array, bytecode_array_loaded; | 537 Label load_debug_bytecode_array, bytecode_array_loaded; |
538 __ cmp(FieldOperand(eax, SharedFunctionInfo::kDebugInfoOffset), | 538 __ JumpIfNotSmi(FieldOperand(eax, SharedFunctionInfo::kDebugInfoOffset), |
539 Immediate(DebugInfo::uninitialized())); | 539 &load_debug_bytecode_array); |
540 __ j(not_equal, &load_debug_bytecode_array); | |
541 __ mov(kInterpreterBytecodeArrayRegister, | 540 __ mov(kInterpreterBytecodeArrayRegister, |
542 FieldOperand(eax, SharedFunctionInfo::kFunctionDataOffset)); | 541 FieldOperand(eax, SharedFunctionInfo::kFunctionDataOffset)); |
543 __ bind(&bytecode_array_loaded); | 542 __ bind(&bytecode_array_loaded); |
544 | 543 |
545 // Check whether we should continue to use the interpreter. | 544 // Check whether we should continue to use the interpreter. |
546 Label switch_to_different_code_kind; | 545 Label switch_to_different_code_kind; |
547 __ Move(ecx, masm->CodeObject()); // Self-reference to this code. | 546 __ Move(ecx, masm->CodeObject()); // Self-reference to this code. |
548 __ cmp(ecx, FieldOperand(eax, SharedFunctionInfo::kCodeOffset)); | 547 __ cmp(ecx, FieldOperand(eax, SharedFunctionInfo::kCodeOffset)); |
549 __ j(not_equal, &switch_to_different_code_kind); | 548 __ j(not_equal, &switch_to_different_code_kind); |
550 | 549 |
(...skipping 2771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3322 | 3321 |
3323 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { | 3322 void Builtins::Generate_InterpreterOnStackReplacement(MacroAssembler* masm) { |
3324 Generate_OnStackReplacementHelper(masm, true); | 3323 Generate_OnStackReplacementHelper(masm, true); |
3325 } | 3324 } |
3326 | 3325 |
3327 #undef __ | 3326 #undef __ |
3328 } // namespace internal | 3327 } // namespace internal |
3329 } // namespace v8 | 3328 } // namespace v8 |
3330 | 3329 |
3331 #endif // V8_TARGET_ARCH_X87 | 3330 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |