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/code-stubs.h" | 5 #include "src/code-stubs.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #include "src/ast/ast.h" | 9 #include "src/ast/ast.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
432 return compiler::CodeAssembler::GenerateCode(&state); | 432 return compiler::CodeAssembler::GenerateCode(&state); |
433 } | 433 } |
434 | 434 |
435 #define ACCESSOR_ASSEMBLER(Name) \ | 435 #define ACCESSOR_ASSEMBLER(Name) \ |
436 void Name##Stub::GenerateAssembly(CodeAssemblerState* state) const { \ | 436 void Name##Stub::GenerateAssembly(CodeAssemblerState* state) const { \ |
437 AccessorAssembler::Generate##Name(state); \ | 437 AccessorAssembler::Generate##Name(state); \ |
438 } | 438 } |
439 | 439 |
440 ACCESSOR_ASSEMBLER(LoadIC) | 440 ACCESSOR_ASSEMBLER(LoadIC) |
441 ACCESSOR_ASSEMBLER(LoadICTrampoline) | 441 ACCESSOR_ASSEMBLER(LoadICTrampoline) |
442 ACCESSOR_ASSEMBLER(LoadICProtoArray) | |
443 ACCESSOR_ASSEMBLER(LoadGlobalIC) | |
444 ACCESSOR_ASSEMBLER(LoadGlobalICTrampoline) | |
445 ACCESSOR_ASSEMBLER(KeyedLoadICTF) | 442 ACCESSOR_ASSEMBLER(KeyedLoadICTF) |
446 ACCESSOR_ASSEMBLER(KeyedLoadICTrampolineTF) | 443 ACCESSOR_ASSEMBLER(KeyedLoadICTrampolineTF) |
447 ACCESSOR_ASSEMBLER(StoreIC) | 444 ACCESSOR_ASSEMBLER(StoreIC) |
448 ACCESSOR_ASSEMBLER(StoreICTrampoline) | 445 ACCESSOR_ASSEMBLER(StoreICTrampoline) |
449 | 446 |
450 #undef ACCESSOR_ASSEMBLER | 447 #undef ACCESSOR_ASSEMBLER |
451 | 448 |
| 449 void LoadICProtoArrayStub::GenerateAssembly(CodeAssemblerState* state) const { |
| 450 AccessorAssembler::GenerateLoadICProtoArray( |
| 451 state, throw_reference_error_if_nonexistent()); |
| 452 } |
| 453 |
| 454 void LoadGlobalICStub::GenerateAssembly(CodeAssemblerState* state) const { |
| 455 AccessorAssembler::GenerateLoadGlobalIC(state, typeof_mode()); |
| 456 } |
| 457 |
| 458 void LoadGlobalICTrampolineStub::GenerateAssembly( |
| 459 CodeAssemblerState* state) const { |
| 460 AccessorAssembler::GenerateLoadGlobalICTrampoline(state, typeof_mode()); |
| 461 } |
| 462 |
452 void KeyedStoreICTrampolineTFStub::GenerateAssembly( | 463 void KeyedStoreICTrampolineTFStub::GenerateAssembly( |
453 CodeAssemblerState* state) const { | 464 CodeAssemblerState* state) const { |
454 LanguageMode language_mode = StoreICState::GetLanguageMode(GetExtraICState()); | 465 AccessorAssembler::GenerateKeyedStoreICTrampolineTF(state, language_mode()); |
455 AccessorAssembler::GenerateKeyedStoreICTrampolineTF(state, language_mode); | |
456 } | 466 } |
457 | 467 |
458 void KeyedStoreICTFStub::GenerateAssembly( | 468 void KeyedStoreICTFStub::GenerateAssembly( |
459 compiler::CodeAssemblerState* state) const { | 469 compiler::CodeAssemblerState* state) const { |
460 LanguageMode language_mode = StoreICState::GetLanguageMode(GetExtraICState()); | 470 AccessorAssembler::GenerateKeyedStoreICTF(state, language_mode()); |
461 AccessorAssembler::GenerateKeyedStoreICTF(state, language_mode); | |
462 } | 471 } |
463 | 472 |
464 void StoreMapStub::GenerateAssembly(compiler::CodeAssemblerState* state) const { | 473 void StoreMapStub::GenerateAssembly(compiler::CodeAssemblerState* state) const { |
465 typedef compiler::Node Node; | 474 typedef compiler::Node Node; |
466 CodeStubAssembler assembler(state); | 475 CodeStubAssembler assembler(state); |
467 | 476 |
468 Node* receiver = assembler.Parameter(Descriptor::kReceiver); | 477 Node* receiver = assembler.Parameter(Descriptor::kReceiver); |
469 Node* map = assembler.Parameter(Descriptor::kMap); | 478 Node* map = assembler.Parameter(Descriptor::kMap); |
470 Node* value = assembler.Parameter(Descriptor::kValue); | 479 Node* value = assembler.Parameter(Descriptor::kValue); |
471 | 480 |
(...skipping 2733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3205 } | 3214 } |
3206 | 3215 |
3207 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate) | 3216 ArrayConstructorStub::ArrayConstructorStub(Isolate* isolate) |
3208 : PlatformCodeStub(isolate) {} | 3217 : PlatformCodeStub(isolate) {} |
3209 | 3218 |
3210 InternalArrayConstructorStub::InternalArrayConstructorStub(Isolate* isolate) | 3219 InternalArrayConstructorStub::InternalArrayConstructorStub(Isolate* isolate) |
3211 : PlatformCodeStub(isolate) {} | 3220 : PlatformCodeStub(isolate) {} |
3212 | 3221 |
3213 } // namespace internal | 3222 } // namespace internal |
3214 } // namespace v8 | 3223 } // namespace v8 |
OLD | NEW |