| OLD | NEW |
| 1 // Copyright 2006-2009 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2009 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 } | 137 } |
| 138 | 138 |
| 139 | 139 |
| 140 // Calling conventions: | 140 // Calling conventions: |
| 141 // fp: caller's frame pointer | 141 // fp: caller's frame pointer |
| 142 // sp: stack pointer | 142 // sp: stack pointer |
| 143 // r1: called JS function | 143 // r1: called JS function |
| 144 // cp: callee's context | 144 // cp: callee's context |
| 145 | 145 |
| 146 void CodeGenerator::GenCode(FunctionLiteral* fun) { | 146 void CodeGenerator::GenCode(FunctionLiteral* fun) { |
| 147 // Record the position for debugging purposes. |
| 148 CodeForFunctionPosition(fun); |
| 149 |
| 147 ZoneList<Statement*>* body = fun->body(); | 150 ZoneList<Statement*>* body = fun->body(); |
| 148 | 151 |
| 149 // Initialize state. | 152 // Initialize state. |
| 150 ASSERT(scope_ == NULL); | 153 ASSERT(scope_ == NULL); |
| 151 scope_ = fun->scope(); | 154 scope_ = fun->scope(); |
| 152 ASSERT(allocator_ == NULL); | 155 ASSERT(allocator_ == NULL); |
| 153 RegisterAllocator register_allocator(this); | 156 RegisterAllocator register_allocator(this); |
| 154 allocator_ = ®ister_allocator; | 157 allocator_ = ®ister_allocator; |
| 155 ASSERT(frame_ == NULL); | 158 ASSERT(frame_ == NULL); |
| 156 frame_ = new VirtualFrame(); | 159 frame_ = new VirtualFrame(); |
| (...skipping 6083 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6240 int CompareStub::MinorKey() { | 6243 int CompareStub::MinorKey() { |
| 6241 // Encode the two parameters in a unique 16 bit value. | 6244 // Encode the two parameters in a unique 16 bit value. |
| 6242 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15)); | 6245 ASSERT(static_cast<unsigned>(cc_) >> 28 < (1 << 15)); |
| 6243 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0); | 6246 return (static_cast<unsigned>(cc_) >> 27) | (strict_ ? 1 : 0); |
| 6244 } | 6247 } |
| 6245 | 6248 |
| 6246 | 6249 |
| 6247 #undef __ | 6250 #undef __ |
| 6248 | 6251 |
| 6249 } } // namespace v8::internal | 6252 } } // namespace v8::internal |
| OLD | NEW |