| 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 18 matching lines...) Expand all Loading... |
| 29 | 29 |
| 30 #include "bootstrapper.h" | 30 #include "bootstrapper.h" |
| 31 #include "codegen-inl.h" | 31 #include "codegen-inl.h" |
| 32 #include "compiler.h" | 32 #include "compiler.h" |
| 33 #include "debug.h" | 33 #include "debug.h" |
| 34 #include "ic-inl.h" | 34 #include "ic-inl.h" |
| 35 #include "parser.h" | 35 #include "parser.h" |
| 36 #include "regexp-macro-assembler.h" | 36 #include "regexp-macro-assembler.h" |
| 37 #include "register-allocator-inl.h" | 37 #include "register-allocator-inl.h" |
| 38 #include "scopes.h" | 38 #include "scopes.h" |
| 39 #include "virtual-frame-inl.h" |
| 39 | 40 |
| 40 namespace v8 { | 41 namespace v8 { |
| 41 namespace internal { | 42 namespace internal { |
| 42 | 43 |
| 43 #define __ ACCESS_MASM(masm_) | 44 #define __ ACCESS_MASM(masm_) |
| 44 | 45 |
| 45 // ------------------------------------------------------------------------- | 46 // ------------------------------------------------------------------------- |
| 46 // Platform-specific DeferredCode functions. | 47 // Platform-specific DeferredCode functions. |
| 47 | 48 |
| 48 void DeferredCode::SaveRegisters() { | 49 void DeferredCode::SaveRegisters() { |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 info_(NULL), | 253 info_(NULL), |
| 253 frame_(NULL), | 254 frame_(NULL), |
| 254 allocator_(NULL), | 255 allocator_(NULL), |
| 255 state_(NULL), | 256 state_(NULL), |
| 256 loop_nesting_(0), | 257 loop_nesting_(0), |
| 257 function_return_is_shadowed_(false), | 258 function_return_is_shadowed_(false), |
| 258 in_spilled_code_(false) { | 259 in_spilled_code_(false) { |
| 259 } | 260 } |
| 260 | 261 |
| 261 | 262 |
| 262 Scope* CodeGenerator::scope() { return info_->function()->scope(); } | |
| 263 | |
| 264 | |
| 265 void CodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { | 263 void CodeGenerator::DeclareGlobals(Handle<FixedArray> pairs) { |
| 266 // Call the runtime to declare the globals. The inevitable call | 264 // Call the runtime to declare the globals. The inevitable call |
| 267 // will sync frame elements to memory anyway, so we do it eagerly to | 265 // will sync frame elements to memory anyway, so we do it eagerly to |
| 268 // allow us to push the arguments directly into place. | 266 // allow us to push the arguments directly into place. |
| 269 frame_->SyncRange(0, frame_->element_count() - 1); | 267 frame_->SyncRange(0, frame_->element_count() - 1); |
| 270 | 268 |
| 271 __ movq(kScratchRegister, pairs, RelocInfo::EMBEDDED_OBJECT); | 269 __ movq(kScratchRegister, pairs, RelocInfo::EMBEDDED_OBJECT); |
| 272 frame_->EmitPush(rsi); // The context is the first argument. | 270 frame_->EmitPush(rsi); // The context is the first argument. |
| 273 frame_->EmitPush(kScratchRegister); | 271 frame_->EmitPush(kScratchRegister); |
| 274 frame_->EmitPush(Smi::FromInt(is_eval() ? 1 : 0)); | 272 frame_->EmitPush(Smi::FromInt(is_eval() ? 1 : 0)); |
| (...skipping 9221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9496 // Call the function from C++. | 9494 // Call the function from C++. |
| 9497 return FUNCTION_CAST<ModuloFunction>(buffer); | 9495 return FUNCTION_CAST<ModuloFunction>(buffer); |
| 9498 } | 9496 } |
| 9499 | 9497 |
| 9500 #endif | 9498 #endif |
| 9501 | 9499 |
| 9502 | 9500 |
| 9503 #undef __ | 9501 #undef __ |
| 9504 | 9502 |
| 9505 } } // namespace v8::internal | 9503 } } // namespace v8::internal |
| OLD | NEW |