OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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-factory.h" | 5 #include "src/code-factory.h" |
6 #include "src/code-stubs.h" | 6 #include "src/code-stubs.h" |
7 #include "src/compiler/common-operator.h" | 7 #include "src/compiler/common-operator.h" |
8 #include "src/compiler/js-generic-lowering.h" | 8 #include "src/compiler/js-generic-lowering.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // Nothing to see. | 45 // Nothing to see. |
46 return NoChange(); | 46 return NoChange(); |
47 } | 47 } |
48 return Changed(node); | 48 return Changed(node); |
49 } | 49 } |
50 #define REPLACE_RUNTIME_CALL(op, fun) \ | 50 #define REPLACE_RUNTIME_CALL(op, fun) \ |
51 void JSGenericLowering::Lower##op(Node* node) { \ | 51 void JSGenericLowering::Lower##op(Node* node) { \ |
52 ReplaceWithRuntimeCall(node, fun); \ | 52 ReplaceWithRuntimeCall(node, fun); \ |
53 } | 53 } |
54 REPLACE_RUNTIME_CALL(JSCreateWithContext, Runtime::kPushWithContext) | 54 REPLACE_RUNTIME_CALL(JSCreateWithContext, Runtime::kPushWithContext) |
55 REPLACE_RUNTIME_CALL(JSCreateModuleContext, Runtime::kPushModuleContext) | |
56 REPLACE_RUNTIME_CALL(JSConvertReceiver, Runtime::kConvertReceiver) | 55 REPLACE_RUNTIME_CALL(JSConvertReceiver, Runtime::kConvertReceiver) |
57 #undef REPLACE_RUNTIME_CALL | 56 #undef REPLACE_RUNTIME_CALL |
58 | 57 |
59 #define REPLACE_STUB_CALL(Name) \ | 58 #define REPLACE_STUB_CALL(Name) \ |
60 void JSGenericLowering::LowerJS##Name(Node* node) { \ | 59 void JSGenericLowering::LowerJS##Name(Node* node) { \ |
61 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); \ | 60 CallDescriptor::Flags flags = AdjustFrameStatesForCall(node); \ |
62 Callable callable = CodeFactory::Name(isolate()); \ | 61 Callable callable = CodeFactory::Name(isolate()); \ |
63 ReplaceWithStubCall(node, callable, flags); \ | 62 ReplaceWithStubCall(node, callable, flags); \ |
64 } | 63 } |
65 REPLACE_STUB_CALL(Add) | 64 REPLACE_STUB_CALL(Add) |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 } | 725 } |
727 | 726 |
728 | 727 |
729 MachineOperatorBuilder* JSGenericLowering::machine() const { | 728 MachineOperatorBuilder* JSGenericLowering::machine() const { |
730 return jsgraph()->machine(); | 729 return jsgraph()->machine(); |
731 } | 730 } |
732 | 731 |
733 } // namespace compiler | 732 } // namespace compiler |
734 } // namespace internal | 733 } // namespace internal |
735 } // namespace v8 | 734 } // namespace v8 |
OLD | NEW |