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 21 matching lines...) Expand all Loading... |
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 "jsregexp.h" | 35 #include "jsregexp.h" |
36 #include "parser.h" | 36 #include "parser.h" |
37 #include "regexp-macro-assembler.h" | 37 #include "regexp-macro-assembler.h" |
38 #include "regexp-stack.h" | 38 #include "regexp-stack.h" |
39 #include "register-allocator-inl.h" | 39 #include "register-allocator-inl.h" |
40 #include "runtime.h" | 40 #include "runtime.h" |
41 #include "scopes.h" | 41 #include "scopes.h" |
| 42 #include "virtual-frame-inl.h" |
42 | 43 |
43 namespace v8 { | 44 namespace v8 { |
44 namespace internal { | 45 namespace internal { |
45 | 46 |
46 #define __ ACCESS_MASM(masm_) | 47 #define __ ACCESS_MASM(masm_) |
47 | 48 |
48 // ------------------------------------------------------------------------- | 49 // ------------------------------------------------------------------------- |
49 // Platform-specific DeferredCode functions. | 50 // Platform-specific DeferredCode functions. |
50 | 51 |
51 void DeferredCode::SaveRegisters() { | 52 void DeferredCode::SaveRegisters() { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 info_(NULL), | 110 info_(NULL), |
110 frame_(NULL), | 111 frame_(NULL), |
111 allocator_(NULL), | 112 allocator_(NULL), |
112 state_(NULL), | 113 state_(NULL), |
113 loop_nesting_(0), | 114 loop_nesting_(0), |
114 function_return_is_shadowed_(false), | 115 function_return_is_shadowed_(false), |
115 in_spilled_code_(false) { | 116 in_spilled_code_(false) { |
116 } | 117 } |
117 | 118 |
118 | 119 |
119 Scope* CodeGenerator::scope() { return info_->function()->scope(); } | |
120 | |
121 | |
122 // Calling conventions: | 120 // Calling conventions: |
123 // ebp: caller's frame pointer | 121 // ebp: caller's frame pointer |
124 // esp: stack pointer | 122 // esp: stack pointer |
125 // edi: called JS function | 123 // edi: called JS function |
126 // esi: callee's context | 124 // esi: callee's context |
127 | 125 |
128 void CodeGenerator::Generate(CompilationInfo* info) { | 126 void CodeGenerator::Generate(CompilationInfo* info) { |
129 // Record the position for debugging purposes. | 127 // Record the position for debugging purposes. |
130 CodeForFunctionPosition(info->function()); | 128 CodeForFunctionPosition(info->function()); |
131 Comment cmnt(masm_, "[ function compiled by virtual frame code generator"); | 129 Comment cmnt(masm_, "[ function compiled by virtual frame code generator"); |
(...skipping 10926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11058 | 11056 |
11059 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) | 11057 // Call the runtime; it returns -1 (less), 0 (equal), or 1 (greater) |
11060 // tagged as a small integer. | 11058 // tagged as a small integer. |
11061 __ bind(&runtime); | 11059 __ bind(&runtime); |
11062 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); | 11060 __ TailCallRuntime(Runtime::kStringCompare, 2, 1); |
11063 } | 11061 } |
11064 | 11062 |
11065 #undef __ | 11063 #undef __ |
11066 | 11064 |
11067 } } // namespace v8::internal | 11065 } } // namespace v8::internal |
OLD | NEW |