| 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 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1459 result_var.Bind(assembler->ChangeFloat64ToTagged(finc_result)); | 1459 result_var.Bind(assembler->ChangeFloat64ToTagged(finc_result)); |
| 1460 assembler->Goto(&end); | 1460 assembler->Goto(&end); |
| 1461 } | 1461 } |
| 1462 | 1462 |
| 1463 assembler->Bind(&end); | 1463 assembler->Bind(&end); |
| 1464 assembler->UpdateFeedback(var_type_feedback.value(), type_feedback_vector, | 1464 assembler->UpdateFeedback(var_type_feedback.value(), type_feedback_vector, |
| 1465 slot_id); | 1465 slot_id); |
| 1466 return result_var.value(); | 1466 return result_var.value(); |
| 1467 } | 1467 } |
| 1468 | 1468 |
| 1469 void NumberToStringStub::GenerateAssembly(CodeStubAssembler* assembler) const { |
| 1470 typedef compiler::Node Node; |
| 1471 Node* argument = assembler->Parameter(Descriptor::kArgument); |
| 1472 Node* context = assembler->Parameter(Descriptor::kContext); |
| 1473 assembler->Return(assembler->NumberToString(context, argument)); |
| 1474 } |
| 1475 |
| 1469 // static | 1476 // static |
| 1470 compiler::Node* DecStub::Generate(CodeStubAssembler* assembler, | 1477 compiler::Node* DecStub::Generate(CodeStubAssembler* assembler, |
| 1471 compiler::Node* value, | 1478 compiler::Node* value, |
| 1472 compiler::Node* context, | 1479 compiler::Node* context, |
| 1473 compiler::Node* type_feedback_vector, | 1480 compiler::Node* type_feedback_vector, |
| 1474 compiler::Node* slot_id) { | 1481 compiler::Node* slot_id) { |
| 1475 typedef CodeStubAssembler::Label Label; | 1482 typedef CodeStubAssembler::Label Label; |
| 1476 typedef compiler::Node Node; | 1483 typedef compiler::Node Node; |
| 1477 typedef CodeStubAssembler::Variable Variable; | 1484 typedef CodeStubAssembler::Variable Variable; |
| 1478 | 1485 |
| (...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2039 CallInterfaceDescriptor HandlerStub::GetCallInterfaceDescriptor() const { | 2046 CallInterfaceDescriptor HandlerStub::GetCallInterfaceDescriptor() const { |
| 2040 if (kind() == Code::LOAD_IC || kind() == Code::KEYED_LOAD_IC) { | 2047 if (kind() == Code::LOAD_IC || kind() == Code::KEYED_LOAD_IC) { |
| 2041 return LoadWithVectorDescriptor(isolate()); | 2048 return LoadWithVectorDescriptor(isolate()); |
| 2042 } else { | 2049 } else { |
| 2043 DCHECK(kind() == Code::STORE_IC || kind() == Code::KEYED_STORE_IC); | 2050 DCHECK(kind() == Code::STORE_IC || kind() == Code::KEYED_STORE_IC); |
| 2044 return StoreWithVectorDescriptor(isolate()); | 2051 return StoreWithVectorDescriptor(isolate()); |
| 2045 } | 2052 } |
| 2046 } | 2053 } |
| 2047 | 2054 |
| 2048 | 2055 |
| 2049 void NumberToStringStub::InitializeDescriptor(CodeStubDescriptor* descriptor) { | |
| 2050 descriptor->Initialize( | |
| 2051 Runtime::FunctionForId(Runtime::kNumberToString)->entry); | |
| 2052 descriptor->SetMissHandler(Runtime::kNumberToString); | |
| 2053 } | |
| 2054 | |
| 2055 void RegExpConstructResultStub::InitializeDescriptor( | 2056 void RegExpConstructResultStub::InitializeDescriptor( |
| 2056 CodeStubDescriptor* descriptor) { | 2057 CodeStubDescriptor* descriptor) { |
| 2057 descriptor->Initialize( | 2058 descriptor->Initialize( |
| 2058 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); | 2059 Runtime::FunctionForId(Runtime::kRegExpConstructResult)->entry); |
| 2059 descriptor->SetMissHandler(Runtime::kRegExpConstructResult); | 2060 descriptor->SetMissHandler(Runtime::kRegExpConstructResult); |
| 2060 } | 2061 } |
| 2061 | 2062 |
| 2062 | 2063 |
| 2063 void TransitionElementsKindStub::InitializeDescriptor( | 2064 void TransitionElementsKindStub::InitializeDescriptor( |
| 2064 CodeStubDescriptor* descriptor) { | 2065 CodeStubDescriptor* descriptor) { |
| (...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3007 | 3008 |
| 3008 if (type == MachineType::Pointer()) { | 3009 if (type == MachineType::Pointer()) { |
| 3009 return Representation::External(); | 3010 return Representation::External(); |
| 3010 } | 3011 } |
| 3011 | 3012 |
| 3012 return Representation::Tagged(); | 3013 return Representation::Tagged(); |
| 3013 } | 3014 } |
| 3014 | 3015 |
| 3015 } // namespace internal | 3016 } // namespace internal |
| 3016 } // namespace v8 | 3017 } // namespace v8 |
| OLD | NEW |