OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
341 isolate()->factory()-> | 341 isolate()->factory()-> |
342 NewDeoptimizationOutputData(length, TENURED); | 342 NewDeoptimizationOutputData(length, TENURED); |
343 for (int i = 0; i < length; i++) { | 343 for (int i = 0; i < length; i++) { |
344 data->SetAstId(i, Smi::FromInt(bailout_entries_[i].id)); | 344 data->SetAstId(i, Smi::FromInt(bailout_entries_[i].id)); |
345 data->SetPcAndState(i, Smi::FromInt(bailout_entries_[i].pc_and_state)); | 345 data->SetPcAndState(i, Smi::FromInt(bailout_entries_[i].pc_and_state)); |
346 } | 346 } |
347 code->set_deoptimization_data(*data); | 347 code->set_deoptimization_data(*data); |
348 } | 348 } |
349 | 349 |
350 | 350 |
351 void FullCodeGenerator::PrepareForBailout(AstNode* node, State state) { | 351 void FullCodeGenerator::PrepareForBailout(Expression* node, State state) { |
352 PrepareForBailoutForId(node->id(), state); | 352 PrepareForBailoutForId(node->id(), state); |
353 } | 353 } |
354 | 354 |
355 | 355 |
356 void FullCodeGenerator::RecordJSReturnSite(Call* call) { | 356 void FullCodeGenerator::RecordJSReturnSite(Call* call) { |
357 // We record the offset of the function return so we can rebuild the frame | 357 // We record the offset of the function return so we can rebuild the frame |
358 // if the function was inlined, i.e., this is the return address in the | 358 // if the function was inlined, i.e., this is the return address in the |
359 // inlined function's frame. | 359 // inlined function's frame. |
360 // | 360 // |
361 // The state is ignored. We defensively set it to TOS_REG, which is the | 361 // The state is ignored. We defensively set it to TOS_REG, which is the |
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
935 Visit(stmt->else_statement()); | 935 Visit(stmt->else_statement()); |
936 } else { | 936 } else { |
937 VisitForControl(stmt->condition(), &then_part, &done, &then_part); | 937 VisitForControl(stmt->condition(), &then_part, &done, &then_part); |
938 PrepareForBailoutForId(stmt->ThenId(), NO_REGISTERS); | 938 PrepareForBailoutForId(stmt->ThenId(), NO_REGISTERS); |
939 __ bind(&then_part); | 939 __ bind(&then_part); |
940 Visit(stmt->then_statement()); | 940 Visit(stmt->then_statement()); |
941 | 941 |
942 PrepareForBailoutForId(stmt->ElseId(), NO_REGISTERS); | 942 PrepareForBailoutForId(stmt->ElseId(), NO_REGISTERS); |
943 } | 943 } |
944 __ bind(&done); | 944 __ bind(&done); |
945 PrepareForBailoutForId(stmt->id(), NO_REGISTERS); | 945 PrepareForBailoutForId(stmt->IfId(), NO_REGISTERS); |
946 } | 946 } |
947 | 947 |
948 | 948 |
949 void FullCodeGenerator::VisitContinueStatement(ContinueStatement* stmt) { | 949 void FullCodeGenerator::VisitContinueStatement(ContinueStatement* stmt) { |
950 Comment cmnt(masm_, "[ ContinueStatement"); | 950 Comment cmnt(masm_, "[ ContinueStatement"); |
951 SetStatementPosition(stmt); | 951 SetStatementPosition(stmt); |
952 NestedStatement* current = nesting_stack_; | 952 NestedStatement* current = nesting_stack_; |
953 int stack_depth = 0; | 953 int stack_depth = 0; |
954 // When continuing, we clobber the unpredictable value in the accumulator | 954 // When continuing, we clobber the unpredictable value in the accumulator |
955 // with one that's safe for GC. If we hit an exit from the try block of | 955 // with one that's safe for GC. If we hit an exit from the try block of |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1365 __ Drop(stack_depth); | 1365 __ Drop(stack_depth); |
1366 __ PopTryHandler(); | 1366 __ PopTryHandler(); |
1367 return 0; | 1367 return 0; |
1368 } | 1368 } |
1369 | 1369 |
1370 | 1370 |
1371 #undef __ | 1371 #undef __ |
1372 | 1372 |
1373 | 1373 |
1374 } } // namespace v8::internal | 1374 } } // namespace v8::internal |
OLD | NEW |