| 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-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 // With careful management, we won't have to save slot and vector on | 336 // With careful management, we won't have to save slot and vector on |
| 337 // the stack. Simply handle the possibly missing case first. | 337 // the stack. Simply handle the possibly missing case first. |
| 338 // TODO(mvstanton): this code can be more efficient. | 338 // TODO(mvstanton): this code can be more efficient. |
| 339 __ cmp(FieldOperand(receiver, JSFunction::kPrototypeOrInitialMapOffset), | 339 __ cmp(FieldOperand(receiver, JSFunction::kPrototypeOrInitialMapOffset), |
| 340 Immediate(isolate()->factory()->the_hole_value())); | 340 Immediate(isolate()->factory()->the_hole_value())); |
| 341 __ j(equal, &miss); | 341 __ j(equal, &miss); |
| 342 __ TryGetFunctionPrototype(receiver, eax, ebx, &miss); | 342 __ TryGetFunctionPrototype(receiver, eax, ebx, &miss); |
| 343 __ ret(0); | 343 __ ret(0); |
| 344 | 344 |
| 345 __ bind(&miss); | 345 __ bind(&miss); |
| 346 PropertyAccessCompiler::TailCallBuiltin( | 346 PropertyAccessCompiler::TailCallMissHandler(masm, Code::LOAD_IC); |
| 347 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); | |
| 348 } | 347 } |
| 349 | 348 |
| 350 | 349 |
| 351 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { | 350 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { |
| 352 // Return address is on the stack. | 351 // Return address is on the stack. |
| 353 Label miss; | 352 Label miss; |
| 354 | 353 |
| 355 Register receiver = LoadDescriptor::ReceiverRegister(); | 354 Register receiver = LoadDescriptor::ReceiverRegister(); |
| 356 Register index = LoadDescriptor::NameRegister(); | 355 Register index = LoadDescriptor::NameRegister(); |
| 357 Register scratch = edi; | 356 Register scratch = edi; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 370 &miss, // When not a number. | 369 &miss, // When not a number. |
| 371 &miss, // When index out of range. | 370 &miss, // When index out of range. |
| 372 RECEIVER_IS_STRING); | 371 RECEIVER_IS_STRING); |
| 373 char_at_generator.GenerateFast(masm); | 372 char_at_generator.GenerateFast(masm); |
| 374 __ ret(0); | 373 __ ret(0); |
| 375 | 374 |
| 376 StubRuntimeCallHelper call_helper; | 375 StubRuntimeCallHelper call_helper; |
| 377 char_at_generator.GenerateSlow(masm, PART_OF_IC_HANDLER, call_helper); | 376 char_at_generator.GenerateSlow(masm, PART_OF_IC_HANDLER, call_helper); |
| 378 | 377 |
| 379 __ bind(&miss); | 378 __ bind(&miss); |
| 380 PropertyAccessCompiler::TailCallBuiltin( | 379 PropertyAccessCompiler::TailCallMissHandler(masm, Code::KEYED_LOAD_IC); |
| 381 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); | |
| 382 } | 380 } |
| 383 | 381 |
| 384 | 382 |
| 385 void RegExpExecStub::Generate(MacroAssembler* masm) { | 383 void RegExpExecStub::Generate(MacroAssembler* masm) { |
| 386 // Just jump directly to runtime if native RegExp is not selected at compile | 384 // Just jump directly to runtime if native RegExp is not selected at compile |
| 387 // time or if regexp entry in generated code is turned off runtime switch or | 385 // time or if regexp entry in generated code is turned off runtime switch or |
| 388 // at compilation. | 386 // at compilation. |
| 389 #ifdef V8_INTERPRETED_REGEXP | 387 #ifdef V8_INTERPRETED_REGEXP |
| 390 __ TailCallRuntime(Runtime::kRegExpExec); | 388 __ TailCallRuntime(Runtime::kRegExpExec); |
| 391 #else // V8_INTERPRETED_REGEXP | 389 #else // V8_INTERPRETED_REGEXP |
| (...skipping 4993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5385 kStackUnwindSpace, nullptr, return_value_operand, | 5383 kStackUnwindSpace, nullptr, return_value_operand, |
| 5386 NULL); | 5384 NULL); |
| 5387 } | 5385 } |
| 5388 | 5386 |
| 5389 #undef __ | 5387 #undef __ |
| 5390 | 5388 |
| 5391 } // namespace internal | 5389 } // namespace internal |
| 5392 } // namespace v8 | 5390 } // namespace v8 |
| 5393 | 5391 |
| 5394 #endif // V8_TARGET_ARCH_X87 | 5392 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |