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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 UNREACHABLE(); | 95 UNREACHABLE(); |
96 } | 96 } |
97 | 97 |
98 | 98 |
99 void VirtualFrame::Enter() { | 99 void VirtualFrame::Enter() { |
100 Comment cmnt(masm(), "[ Enter JS frame"); | 100 Comment cmnt(masm(), "[ Enter JS frame"); |
101 | 101 |
102 #ifdef DEBUG | 102 #ifdef DEBUG |
103 // Verify that r1 contains a JS function. The following code relies | 103 // Verify that r1 contains a JS function. The following code relies |
104 // on r2 being available for use. | 104 // on r2 being available for use. |
105 { Label map_check, done; | 105 if (FLAG_debug_code) { |
| 106 Label map_check, done; |
106 __ tst(r1, Operand(kSmiTagMask)); | 107 __ tst(r1, Operand(kSmiTagMask)); |
107 __ b(ne, &map_check); | 108 __ b(ne, &map_check); |
108 __ stop("VirtualFrame::Enter - r1 is not a function (smi check)."); | 109 __ stop("VirtualFrame::Enter - r1 is not a function (smi check)."); |
109 __ bind(&map_check); | 110 __ bind(&map_check); |
110 __ CompareObjectType(r1, r2, r2, JS_FUNCTION_TYPE); | 111 __ CompareObjectType(r1, r2, r2, JS_FUNCTION_TYPE); |
111 __ b(eq, &done); | 112 __ b(eq, &done); |
112 __ stop("VirtualFrame::Enter - r1 is not a function (map check)."); | 113 __ stop("VirtualFrame::Enter - r1 is not a function (map check)."); |
113 __ bind(&done); | 114 __ bind(&done); |
114 } | 115 } |
115 #endif // DEBUG | 116 #endif // DEBUG |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 ASSERT(stack_pointer_ == element_count() - 1); | 367 ASSERT(stack_pointer_ == element_count() - 1); |
367 elements_.Add(FrameElement::MemoryElement()); | 368 elements_.Add(FrameElement::MemoryElement()); |
368 stack_pointer_++; | 369 stack_pointer_++; |
369 __ push(reg); | 370 __ push(reg); |
370 } | 371 } |
371 | 372 |
372 | 373 |
373 #undef __ | 374 #undef __ |
374 | 375 |
375 } } // namespace v8::internal | 376 } } // namespace v8::internal |
OLD | NEW |