| OLD | NEW |
| 1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // o r1: the JS function object being called (ie, ourselves) | 45 // o r1: the JS function object being called (ie, ourselves) |
| 46 // o cp: our context | 46 // o cp: our context |
| 47 // o fp: our caller's frame pointer | 47 // o fp: our caller's frame pointer |
| 48 // o sp: stack pointer | 48 // o sp: stack pointer |
| 49 // o lr: return address | 49 // o lr: return address |
| 50 // | 50 // |
| 51 // The function builds a JS frame. Please see JavaScriptFrameConstants in | 51 // The function builds a JS frame. Please see JavaScriptFrameConstants in |
| 52 // frames-arm.h for its layout. | 52 // frames-arm.h for its layout. |
| 53 void FastCodeGenerator::Generate(FunctionLiteral* fun) { | 53 void FastCodeGenerator::Generate(FunctionLiteral* fun) { |
| 54 function_ = fun; | 54 function_ = fun; |
| 55 // ARM does NOT call SetFunctionPosition. | 55 SetFunctionPosition(fun); |
| 56 | 56 |
| 57 __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); | 57 __ stm(db_w, sp, r1.bit() | cp.bit() | fp.bit() | lr.bit()); |
| 58 // Adjust fp to point to caller's fp. | 58 // Adjust fp to point to caller's fp. |
| 59 __ add(fp, sp, Operand(2 * kPointerSize)); | 59 __ add(fp, sp, Operand(2 * kPointerSize)); |
| 60 | 60 |
| 61 { Comment cmnt(masm_, "[ Allocate locals"); | 61 { Comment cmnt(masm_, "[ Allocate locals"); |
| 62 int locals_count = fun->scope()->num_stack_slots(); | 62 int locals_count = fun->scope()->num_stack_slots(); |
| 63 if (locals_count > 0) { | 63 if (locals_count > 0) { |
| 64 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); | 64 __ LoadRoot(ip, Heap::kUndefinedValueRootIndex); |
| 65 } | 65 } |
| (...skipping 1211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1277 true_label_ = saved_true; | 1277 true_label_ = saved_true; |
| 1278 false_label_ = saved_false; | 1278 false_label_ = saved_false; |
| 1279 // Convert current context to test context: End post-test code. | 1279 // Convert current context to test context: End post-test code. |
| 1280 } | 1280 } |
| 1281 | 1281 |
| 1282 | 1282 |
| 1283 #undef __ | 1283 #undef __ |
| 1284 | 1284 |
| 1285 | 1285 |
| 1286 } } // namespace v8::internal | 1286 } } // namespace v8::internal |
| OLD | NEW |