OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/crankshaft/lithium-codegen.h" | 5 #include "src/crankshaft/lithium-codegen.h" |
6 | 6 |
7 #include <sstream> | 7 #include <sstream> |
8 | 8 |
9 #if V8_TARGET_ARCH_IA32 | 9 #if V8_TARGET_ARCH_IA32 |
10 #include "src/crankshaft/ia32/lithium-ia32.h" // NOLINT | 10 #include "src/crankshaft/ia32/lithium-ia32.h" // NOLINT |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 translation->BeginConstructStubFrame(shared_id, translation_size); | 233 translation->BeginConstructStubFrame(shared_id, translation_size); |
234 if (info()->closure().is_identical_to(environment->closure())) { | 234 if (info()->closure().is_identical_to(environment->closure())) { |
235 translation->StoreJSFrameFunction(); | 235 translation->StoreJSFrameFunction(); |
236 } else { | 236 } else { |
237 int closure_id = DefineDeoptimizationLiteral(environment->closure()); | 237 int closure_id = DefineDeoptimizationLiteral(environment->closure()); |
238 translation->StoreLiteral(closure_id); | 238 translation->StoreLiteral(closure_id); |
239 } | 239 } |
240 break; | 240 break; |
241 } | 241 } |
242 case JS_GETTER: { | 242 case JS_GETTER: { |
243 DCHECK(translation_size == 1); | 243 DCHECK_EQ(1, translation_size); |
244 DCHECK(height == 0); | 244 DCHECK_EQ(0, height); |
245 int shared_id = DefineDeoptimizationLiteral( | 245 int shared_id = DefineDeoptimizationLiteral( |
246 environment->entry() ? environment->entry()->shared() | 246 environment->entry() ? environment->entry()->shared() |
247 : info()->shared_info()); | 247 : info()->shared_info()); |
248 translation->BeginGetterStubFrame(shared_id); | 248 translation->BeginGetterStubFrame(shared_id); |
249 if (info()->closure().is_identical_to(environment->closure())) { | 249 if (info()->closure().is_identical_to(environment->closure())) { |
250 translation->StoreJSFrameFunction(); | 250 translation->StoreJSFrameFunction(); |
251 } else { | 251 } else { |
252 int closure_id = DefineDeoptimizationLiteral(environment->closure()); | 252 int closure_id = DefineDeoptimizationLiteral(environment->closure()); |
253 translation->StoreLiteral(closure_id); | 253 translation->StoreLiteral(closure_id); |
254 } | 254 } |
255 break; | 255 break; |
256 } | 256 } |
257 case JS_SETTER: { | 257 case JS_SETTER: { |
258 DCHECK(translation_size == 2); | 258 DCHECK_EQ(2, translation_size); |
259 DCHECK(height == 0); | 259 DCHECK_EQ(0, height); |
260 int shared_id = DefineDeoptimizationLiteral( | 260 int shared_id = DefineDeoptimizationLiteral( |
261 environment->entry() ? environment->entry()->shared() | 261 environment->entry() ? environment->entry()->shared() |
262 : info()->shared_info()); | 262 : info()->shared_info()); |
263 translation->BeginSetterStubFrame(shared_id); | 263 translation->BeginSetterStubFrame(shared_id); |
264 if (info()->closure().is_identical_to(environment->closure())) { | 264 if (info()->closure().is_identical_to(environment->closure())) { |
265 translation->StoreJSFrameFunction(); | 265 translation->StoreJSFrameFunction(); |
266 } else { | 266 } else { |
267 int closure_id = DefineDeoptimizationLiteral(environment->closure()); | 267 int closure_id = DefineDeoptimizationLiteral(environment->closure()); |
268 translation->StoreLiteral(closure_id); | 268 translation->StoreLiteral(closure_id); |
269 } | 269 } |
270 break; | 270 break; |
271 } | 271 } |
| 272 case TAIL_CALLER_FUNCTION: { |
| 273 DCHECK_EQ(0, translation_size); |
| 274 int shared_id = DefineDeoptimizationLiteral( |
| 275 environment->entry() ? environment->entry()->shared() |
| 276 : info()->shared_info()); |
| 277 translation->BeginTailCallerFrame(shared_id); |
| 278 if (info()->closure().is_identical_to(environment->closure())) { |
| 279 translation->StoreJSFrameFunction(); |
| 280 } else { |
| 281 int closure_id = DefineDeoptimizationLiteral(environment->closure()); |
| 282 translation->StoreLiteral(closure_id); |
| 283 } |
| 284 break; |
| 285 } |
272 case ARGUMENTS_ADAPTOR: { | 286 case ARGUMENTS_ADAPTOR: { |
273 int shared_id = DefineDeoptimizationLiteral( | 287 int shared_id = DefineDeoptimizationLiteral( |
274 environment->entry() ? environment->entry()->shared() | 288 environment->entry() ? environment->entry()->shared() |
275 : info()->shared_info()); | 289 : info()->shared_info()); |
276 translation->BeginArgumentsAdaptorFrame(shared_id, translation_size); | 290 translation->BeginArgumentsAdaptorFrame(shared_id, translation_size); |
277 if (info()->closure().is_identical_to(environment->closure())) { | 291 if (info()->closure().is_identical_to(environment->closure())) { |
278 translation->StoreJSFrameFunction(); | 292 translation->StoreJSFrameFunction(); |
279 } else { | 293 } else { |
280 int closure_id = DefineDeoptimizationLiteral(environment->closure()); | 294 int closure_id = DefineDeoptimizationLiteral(environment->closure()); |
281 translation->StoreLiteral(closure_id); | 295 translation->StoreLiteral(closure_id); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 Deoptimizer::DeoptInfo LCodeGenBase::MakeDeoptInfo( | 368 Deoptimizer::DeoptInfo LCodeGenBase::MakeDeoptInfo( |
355 LInstruction* instr, Deoptimizer::DeoptReason deopt_reason) { | 369 LInstruction* instr, Deoptimizer::DeoptReason deopt_reason) { |
356 Deoptimizer::DeoptInfo deopt_info(instr->hydrogen_value()->position(), | 370 Deoptimizer::DeoptInfo deopt_info(instr->hydrogen_value()->position(), |
357 instr->Mnemonic(), deopt_reason); | 371 instr->Mnemonic(), deopt_reason); |
358 HEnterInlined* enter_inlined = instr->environment()->entry(); | 372 HEnterInlined* enter_inlined = instr->environment()->entry(); |
359 deopt_info.inlining_id = enter_inlined ? enter_inlined->inlining_id() : 0; | 373 deopt_info.inlining_id = enter_inlined ? enter_inlined->inlining_id() : 0; |
360 return deopt_info; | 374 return deopt_info; |
361 } | 375 } |
362 } // namespace internal | 376 } // namespace internal |
363 } // namespace v8 | 377 } // namespace v8 |
OLD | NEW |