| OLD | NEW | 
|     1 // Copyright 2012 the V8 project authors. All rights reserved. |     1 // Copyright 2012 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   111 }; |   111 }; | 
|   112  |   112  | 
|   113  |   113  | 
|   114 static void EmitStackCheck(MacroAssembler* masm_, |   114 static void EmitStackCheck(MacroAssembler* masm_, | 
|   115                            Register stack_limit_scratch, |   115                            Register stack_limit_scratch, | 
|   116                            int pointers = 0, |   116                            int pointers = 0, | 
|   117                            Register scratch = sp) { |   117                            Register scratch = sp) { | 
|   118     Isolate* isolate = masm_->isolate(); |   118     Isolate* isolate = masm_->isolate(); | 
|   119   Label ok; |   119   Label ok; | 
|   120   ASSERT(scratch.is(sp) == (pointers == 0)); |   120   ASSERT(scratch.is(sp) == (pointers == 0)); | 
 |   121   Heap::RootListIndex index; | 
|   121   if (pointers != 0) { |   122   if (pointers != 0) { | 
|   122     __ sub(scratch, sp, Operand(pointers * kPointerSize)); |   123     __ sub(scratch, sp, Operand(pointers * kPointerSize)); | 
 |   124     index = Heap::kRealStackLimitRootIndex; | 
 |   125   } else { | 
 |   126     index = Heap::kStackLimitRootIndex; | 
|   123   } |   127   } | 
|   124   __ LoadRoot(stack_limit_scratch, Heap::kStackLimitRootIndex); |   128   __ LoadRoot(stack_limit_scratch, index); | 
|   125   __ cmp(scratch, Operand(stack_limit_scratch)); |   129   __ cmp(scratch, Operand(stack_limit_scratch)); | 
|   126   __ b(hs, &ok); |   130   __ b(hs, &ok); | 
|   127   PredictableCodeSizeScope predictable(masm_, 2 * Assembler::kInstrSize); |   131   PredictableCodeSizeScope predictable(masm_, 2 * Assembler::kInstrSize); | 
|   128   __ Call(isolate->builtins()->StackCheck(), RelocInfo::CODE_TARGET); |   132   __ Call(isolate->builtins()->StackCheck(), RelocInfo::CODE_TARGET); | 
|   129   __ bind(&ok); |   133   __ bind(&ok); | 
|   130 } |   134 } | 
|   131  |   135  | 
|   132  |   136  | 
|   133 // Generate code for a JS function.  On entry to the function the receiver |   137 // Generate code for a JS function.  On entry to the function the receiver | 
|   134 // and arguments have been pushed on the stack left to right.  The actual |   138 // and arguments have been pushed on the stack left to right.  The actual | 
| (...skipping 4788 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  4923  |  4927  | 
|  4924   ASSERT(interrupt_address == |  4928   ASSERT(interrupt_address == | 
|  4925          isolate->builtins()->OsrAfterStackCheck()->entry()); |  4929          isolate->builtins()->OsrAfterStackCheck()->entry()); | 
|  4926   return OSR_AFTER_STACK_CHECK; |  4930   return OSR_AFTER_STACK_CHECK; | 
|  4927 } |  4931 } | 
|  4928  |  4932  | 
|  4929  |  4933  | 
|  4930 } }  // namespace v8::internal |  4934 } }  // namespace v8::internal | 
|  4931  |  4935  | 
|  4932 #endif  // V8_TARGET_ARCH_ARM |  4936 #endif  // V8_TARGET_ARCH_ARM | 
| OLD | NEW |