OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 | 114 |
115 CodeGenState::~CodeGenState() { | 115 CodeGenState::~CodeGenState() { |
116 ASSERT(owner_->state() == this); | 116 ASSERT(owner_->state() == this); |
117 owner_->set_state(previous_); | 117 owner_->set_state(previous_); |
118 } | 118 } |
119 | 119 |
120 | 120 |
121 // ------------------------------------------------------------------------- | 121 // ------------------------------------------------------------------------- |
122 // CodeGenerator implementation | 122 // CodeGenerator implementation |
123 | 123 |
124 CodeGenerator::CodeGenerator(int buffer_size, Handle<Script> script, | 124 CodeGenerator::CodeGenerator(MacroAssembler* masm, |
| 125 Handle<Script> script, |
125 bool is_eval) | 126 bool is_eval) |
126 : is_eval_(is_eval), | 127 : is_eval_(is_eval), |
127 script_(script), | 128 script_(script), |
128 deferred_(8), | 129 deferred_(8), |
129 masm_(new MacroAssembler(NULL, buffer_size)), | 130 masm_(masm), |
130 scope_(NULL), | 131 scope_(NULL), |
131 frame_(NULL), | 132 frame_(NULL), |
132 allocator_(NULL), | 133 allocator_(NULL), |
133 cc_reg_(al), | 134 cc_reg_(al), |
134 state_(NULL), | 135 state_(NULL), |
135 function_return_is_shadowed_(false) { | 136 function_return_is_shadowed_(false) { |
136 } | 137 } |
137 | 138 |
138 | 139 |
139 // Calling conventions: | 140 // Calling conventions: |
(...skipping 6802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6942 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) | 6943 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) |
6943 // tagged as a small integer. | 6944 // tagged as a small integer. |
6944 __ bind(&runtime); | 6945 __ bind(&runtime); |
6945 __ TailCallRuntime(ExternalReference(Runtime::kStringCompare), 2, 1); | 6946 __ TailCallRuntime(ExternalReference(Runtime::kStringCompare), 2, 1); |
6946 } | 6947 } |
6947 | 6948 |
6948 | 6949 |
6949 #undef __ | 6950 #undef __ |
6950 | 6951 |
6951 } } // namespace v8::internal | 6952 } } // namespace v8::internal |
OLD | NEW |