Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(546)

Side by Side Diff: src/ia32/full-codegen-ia32.cc

Issue 225623002: Version 3.25.28.5 (merged r20357) (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.25
Patch Set: Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 bool info_emitted_; 99 bool info_emitted_;
100 #endif 100 #endif
101 }; 101 };
102 102
103 103
104 static void EmitStackCheck(MacroAssembler* masm_, 104 static void EmitStackCheck(MacroAssembler* masm_,
105 int pointers = 0, 105 int pointers = 0,
106 Register scratch = esp) { 106 Register scratch = esp) {
107 Label ok; 107 Label ok;
108 Isolate* isolate = masm_->isolate(); 108 Isolate* isolate = masm_->isolate();
109 ExternalReference stack_limit =
110 ExternalReference::address_of_stack_limit(isolate);
111 ASSERT(scratch.is(esp) == (pointers == 0)); 109 ASSERT(scratch.is(esp) == (pointers == 0));
110 ExternalReference stack_limit;
112 if (pointers != 0) { 111 if (pointers != 0) {
113 __ mov(scratch, esp); 112 __ mov(scratch, esp);
114 __ sub(scratch, Immediate(pointers * kPointerSize)); 113 __ sub(scratch, Immediate(pointers * kPointerSize));
114 stack_limit = ExternalReference::address_of_real_stack_limit(isolate);
115 } else {
116 stack_limit = ExternalReference::address_of_stack_limit(isolate);
115 } 117 }
116 __ cmp(scratch, Operand::StaticVariable(stack_limit)); 118 __ cmp(scratch, Operand::StaticVariable(stack_limit));
117 __ j(above_equal, &ok, Label::kNear); 119 __ j(above_equal, &ok, Label::kNear);
118 __ call(isolate->builtins()->StackCheck(), RelocInfo::CODE_TARGET); 120 __ call(isolate->builtins()->StackCheck(), RelocInfo::CODE_TARGET);
119 __ bind(&ok); 121 __ bind(&ok);
120 } 122 }
121 123
122 124
123 // Generate code for a JS function. On entry to the function the receiver 125 // Generate code for a JS function. On entry to the function the receiver
124 // and arguments have been pushed on the stack left to right, with the 126 // and arguments have been pushed on the stack left to right, with the
(...skipping 4811 matching lines...) Expand 10 before | Expand all | Expand 10 after
4936 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4938 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4937 Assembler::target_address_at(call_target_address, 4939 Assembler::target_address_at(call_target_address,
4938 unoptimized_code)); 4940 unoptimized_code));
4939 return OSR_AFTER_STACK_CHECK; 4941 return OSR_AFTER_STACK_CHECK;
4940 } 4942 }
4941 4943
4942 4944
4943 } } // namespace v8::internal 4945 } } // namespace v8::internal
4944 4946
4945 #endif // V8_TARGET_ARCH_IA32 4947 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/arm64/full-codegen-arm64.cc ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698