OLD | NEW |
1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 234 |
235 Result VirtualFrame::RawCallStub(CodeStub* stub) { | 235 Result VirtualFrame::RawCallStub(CodeStub* stub) { |
236 ASSERT(cgen_->HasValidEntryRegisters()); | 236 ASSERT(cgen_->HasValidEntryRegisters()); |
237 __ CallStub(stub); | 237 __ CallStub(stub); |
238 Result result = cgen_->allocator()->Allocate(r0); | 238 Result result = cgen_->allocator()->Allocate(r0); |
239 ASSERT(result.is_valid()); | 239 ASSERT(result.is_valid()); |
240 return result; | 240 return result; |
241 } | 241 } |
242 | 242 |
243 | 243 |
| 244 Result VirtualFrame::CallStub(CodeStub* stub, Result* arg) { |
| 245 PrepareForCall(0, 0); |
| 246 arg->Unuse(); |
| 247 return RawCallStub(stub); |
| 248 } |
| 249 |
| 250 |
| 251 Result VirtualFrame::CallStub(CodeStub* stub, Result* arg0, Result* arg1) { |
| 252 PrepareForCall(0, 0); |
| 253 arg0->Unuse(); |
| 254 arg1->Unuse(); |
| 255 return RawCallStub(stub); |
| 256 } |
| 257 |
| 258 |
244 Result VirtualFrame::CallRuntime(Runtime::Function* f, int arg_count) { | 259 Result VirtualFrame::CallRuntime(Runtime::Function* f, int arg_count) { |
245 PrepareForCall(arg_count, arg_count); | 260 PrepareForCall(arg_count, arg_count); |
246 ASSERT(cgen_->HasValidEntryRegisters()); | 261 ASSERT(cgen_->HasValidEntryRegisters()); |
247 __ CallRuntime(f, arg_count); | 262 __ CallRuntime(f, arg_count); |
248 Result result = cgen_->allocator()->Allocate(r0); | 263 Result result = cgen_->allocator()->Allocate(r0); |
249 ASSERT(result.is_valid()); | 264 ASSERT(result.is_valid()); |
250 return result; | 265 return result; |
251 } | 266 } |
252 | 267 |
253 | 268 |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 ASSERT(stack_pointer_ == elements_.length() - 1); | 426 ASSERT(stack_pointer_ == elements_.length() - 1); |
412 elements_.Add(FrameElement::MemoryElement()); | 427 elements_.Add(FrameElement::MemoryElement()); |
413 stack_pointer_++; | 428 stack_pointer_++; |
414 __ push(reg); | 429 __ push(reg); |
415 } | 430 } |
416 | 431 |
417 | 432 |
418 #undef __ | 433 #undef __ |
419 | 434 |
420 } } // namespace v8::internal | 435 } } // namespace v8::internal |
OLD | NEW |