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

Side by Side Diff: src/x64/full-codegen-x64.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/version.cc ('k') | test/cctest/test-heap.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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 = rsp) { 106 Register scratch = rsp) {
107 Isolate* isolate = masm_->isolate(); 107 Isolate* isolate = masm_->isolate();
108 Label ok; 108 Label ok;
109 ASSERT(scratch.is(rsp) == (pointers == 0)); 109 ASSERT(scratch.is(rsp) == (pointers == 0));
110 Heap::RootListIndex index;
110 if (pointers != 0) { 111 if (pointers != 0) {
111 __ movq(scratch, rsp); 112 __ movq(scratch, rsp);
112 __ subq(scratch, Immediate(pointers * kPointerSize)); 113 __ subq(scratch, Immediate(pointers * kPointerSize));
114 index = Heap::kRealStackLimitRootIndex;
115 } else {
116 index = Heap::kStackLimitRootIndex;
113 } 117 }
114 __ CompareRoot(scratch, Heap::kStackLimitRootIndex); 118 __ CompareRoot(scratch, index);
115 __ j(above_equal, &ok, Label::kNear); 119 __ j(above_equal, &ok, Label::kNear);
116 __ call(isolate->builtins()->StackCheck(), RelocInfo::CODE_TARGET); 120 __ call(isolate->builtins()->StackCheck(), RelocInfo::CODE_TARGET);
117 __ bind(&ok); 121 __ bind(&ok);
118 } 122 }
119 123
120 124
121 // 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
122 // 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
123 // return address on top of them. The actual argument count matches the 127 // return address on top of them. The actual argument count matches the
124 // formal parameter count expected by the function. 128 // formal parameter count expected by the function.
(...skipping 4807 matching lines...) Expand 10 before | Expand all | Expand 10 after
4932 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), 4936 ASSERT_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(),
4933 Assembler::target_address_at(call_target_address, 4937 Assembler::target_address_at(call_target_address,
4934 unoptimized_code)); 4938 unoptimized_code));
4935 return OSR_AFTER_STACK_CHECK; 4939 return OSR_AFTER_STACK_CHECK;
4936 } 4940 }
4937 4941
4938 4942
4939 } } // namespace v8::internal 4943 } } // namespace v8::internal
4940 4944
4941 #endif // V8_TARGET_ARCH_X64 4945 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/version.cc ('k') | test/cctest/test-heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698