| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 #include "src/code-stub-assembler.h" | 4 #include "src/code-stub-assembler.h" |
| 5 #include "src/code-factory.h" | 5 #include "src/code-factory.h" |
| 6 #include "src/frames-inl.h" | 6 #include "src/frames-inl.h" |
| 7 #include "src/frames.h" | 7 #include "src/frames.h" |
| 8 #include "src/ic/handler-configuration.h" | 8 #include "src/ic/handler-configuration.h" |
| 9 #include "src/ic/stub-cache.h" | 9 #include "src/ic/stub-cache.h" |
| 10 | 10 |
| 11 namespace v8 { | 11 namespace v8 { |
| 12 namespace internal { | 12 namespace internal { |
| 13 | 13 |
| 14 using compiler::Node; | 14 using compiler::Node; |
| 15 | 15 |
| 16 CodeStubAssembler::CodeStubAssembler(Isolate* isolate, Zone* zone, | |
| 17 const CallInterfaceDescriptor& descriptor, | |
| 18 Code::Flags flags, const char* name, | |
| 19 size_t result_size) | |
| 20 : compiler::CodeAssembler(isolate, zone, descriptor, flags, name, | |
| 21 result_size) {} | |
| 22 | |
| 23 CodeStubAssembler::CodeStubAssembler(Isolate* isolate, Zone* zone, | |
| 24 int parameter_count, Code::Flags flags, | |
| 25 const char* name) | |
| 26 : compiler::CodeAssembler(isolate, zone, parameter_count, flags, name) {} | |
| 27 | |
| 28 void CodeStubAssembler::Assert(ConditionBody codition_body, const char* message, | 16 void CodeStubAssembler::Assert(ConditionBody codition_body, const char* message, |
| 29 const char* file, int line) { | 17 const char* file, int line) { |
| 30 #if defined(DEBUG) | 18 #if defined(DEBUG) |
| 31 Label ok(this); | 19 Label ok(this); |
| 32 Label not_ok(this, Label::kDeferred); | 20 Label not_ok(this, Label::kDeferred); |
| 33 if (message != nullptr && FLAG_code_comments) { | 21 if (message != nullptr && FLAG_code_comments) { |
| 34 Comment("[ Assert: %s", message); | 22 Comment("[ Assert: %s", message); |
| 35 } else { | 23 } else { |
| 36 Comment("[ Assert"); | 24 Comment("[ Assert"); |
| 37 } | 25 } |
| (...skipping 9008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9046 } | 9034 } |
| 9047 | 9035 |
| 9048 void CodeStubArguments::PopAndReturn(compiler::Node* value) { | 9036 void CodeStubArguments::PopAndReturn(compiler::Node* value) { |
| 9049 assembler_->PopAndReturn( | 9037 assembler_->PopAndReturn( |
| 9050 assembler_->IntPtrAddFoldConstants(argc_, assembler_->IntPtrConstant(1)), | 9038 assembler_->IntPtrAddFoldConstants(argc_, assembler_->IntPtrConstant(1)), |
| 9051 value); | 9039 value); |
| 9052 } | 9040 } |
| 9053 | 9041 |
| 9054 } // namespace internal | 9042 } // namespace internal |
| 9055 } // namespace v8 | 9043 } // namespace v8 |
| OLD | NEW |