| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 frame_->EmitPush(kScratchRegister); | 273 frame_->EmitPush(kScratchRegister); |
| 274 frame_->EmitPush(Smi::FromInt(is_eval() ? 1 : 0)); | 274 frame_->EmitPush(Smi::FromInt(is_eval() ? 1 : 0)); |
| 275 Result ignored = frame_->CallRuntime(Runtime::kDeclareGlobals, 3); | 275 Result ignored = frame_->CallRuntime(Runtime::kDeclareGlobals, 3); |
| 276 // Return value is ignored. | 276 // Return value is ignored. |
| 277 } | 277 } |
| 278 | 278 |
| 279 | 279 |
| 280 void CodeGenerator::Generate(CompilationInfo* info) { | 280 void CodeGenerator::Generate(CompilationInfo* info) { |
| 281 // Record the position for debugging purposes. | 281 // Record the position for debugging purposes. |
| 282 CodeForFunctionPosition(info->function()); | 282 CodeForFunctionPosition(info->function()); |
| 283 Comment cmnt(masm_, "[ function compiled by virtual frame code generator"); |
| 283 | 284 |
| 284 // Initialize state. | 285 // Initialize state. |
| 285 info_ = info; | 286 info_ = info; |
| 286 ASSERT(allocator_ == NULL); | 287 ASSERT(allocator_ == NULL); |
| 287 RegisterAllocator register_allocator(this); | 288 RegisterAllocator register_allocator(this); |
| 288 allocator_ = ®ister_allocator; | 289 allocator_ = ®ister_allocator; |
| 289 ASSERT(frame_ == NULL); | 290 ASSERT(frame_ == NULL); |
| 290 frame_ = new VirtualFrame(); | 291 frame_ = new VirtualFrame(); |
| 291 set_in_spilled_code(false); | 292 set_in_spilled_code(false); |
| 292 | 293 |
| (...skipping 9221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9514 // Call the function from C++. | 9515 // Call the function from C++. |
| 9515 return FUNCTION_CAST<ModuloFunction>(buffer); | 9516 return FUNCTION_CAST<ModuloFunction>(buffer); |
| 9516 } | 9517 } |
| 9517 | 9518 |
| 9518 #endif | 9519 #endif |
| 9519 | 9520 |
| 9520 | 9521 |
| 9521 #undef __ | 9522 #undef __ |
| 9522 | 9523 |
| 9523 } } // namespace v8::internal | 9524 } } // namespace v8::internal |
| OLD | NEW |