OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 5450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5461 CHECK_ALIVE(VisitForValue(expr->expression())); | 5461 CHECK_ALIVE(VisitForValue(expr->expression())); |
5462 HValue* function = Top(); | 5462 HValue* function = Top(); |
5463 HValue* context = environment()->LookupContext(); | 5463 HValue* context = environment()->LookupContext(); |
5464 HGlobalObject* global = new(zone()) HGlobalObject(context); | 5464 HGlobalObject* global = new(zone()) HGlobalObject(context); |
5465 HGlobalReceiver* receiver = new(zone()) HGlobalReceiver(global); | 5465 HGlobalReceiver* receiver = new(zone()) HGlobalReceiver(global); |
5466 AddInstruction(global); | 5466 AddInstruction(global); |
5467 PushAndAdd(receiver); | 5467 PushAndAdd(receiver); |
5468 CHECK_ALIVE(VisitExpressions(expr->arguments())); | 5468 CHECK_ALIVE(VisitExpressions(expr->arguments())); |
5469 AddInstruction(new(zone()) HCheckFunction(function, expr->target())); | 5469 AddInstruction(new(zone()) HCheckFunction(function, expr->target())); |
5470 | 5470 |
5471 if (TryInlineBuiltinFunctionCall(expr, true)) { // Drop the function. | 5471 if (TryInlineBuiltinFunctionCall(expr, true)) { // Drop the function. |
5472 if (FLAG_trace_inlining) { | 5472 if (FLAG_trace_inlining) { |
5473 PrintF("Inlining builtin "); | 5473 PrintF("Inlining builtin "); |
5474 expr->target()->ShortPrint(); | 5474 expr->target()->ShortPrint(); |
5475 PrintF("\n"); | 5475 PrintF("\n"); |
5476 } | 5476 } |
5477 return; | 5477 return; |
5478 } | 5478 } |
5479 | 5479 |
5480 if (TryInline(expr, true)) { // Drop function from environment. | 5480 if (TryInline(expr, true)) { // Drop function from environment. |
5481 return; | 5481 return; |
(...skipping 2033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7515 } | 7515 } |
7516 } | 7516 } |
7517 | 7517 |
7518 #ifdef DEBUG | 7518 #ifdef DEBUG |
7519 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 7519 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
7520 if (allocator_ != NULL) allocator_->Verify(); | 7520 if (allocator_ != NULL) allocator_->Verify(); |
7521 #endif | 7521 #endif |
7522 } | 7522 } |
7523 | 7523 |
7524 } } // namespace v8::internal | 7524 } } // namespace v8::internal |
OLD | NEW |