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

Side by Side Diff: src/preparser.h

Issue 368053002: Stack overflow checkers are now compatible with ASAN's detect_stack_use_after_return mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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/isolate.cc ('k') | test/cctest/test-parsing.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_PREPARSER_H 5 #ifndef V8_PREPARSER_H
6 #define V8_PREPARSER_H 6 #define V8_PREPARSER_H
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/func-name-inferrer.h" 10 #include "src/func-name-inferrer.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 typename Traits::Type::Zone* zone() const { return zone_; } 239 typename Traits::Type::Zone* zone() const { return zone_; }
240 240
241 INLINE(Token::Value peek()) { 241 INLINE(Token::Value peek()) {
242 if (stack_overflow_) return Token::ILLEGAL; 242 if (stack_overflow_) return Token::ILLEGAL;
243 return scanner()->peek(); 243 return scanner()->peek();
244 } 244 }
245 245
246 INLINE(Token::Value Next()) { 246 INLINE(Token::Value Next()) {
247 if (stack_overflow_) return Token::ILLEGAL; 247 if (stack_overflow_) return Token::ILLEGAL;
248 { 248 {
249 int marker; 249 if (GetCurrentStackPosition() < stack_limit_) {
250 if (reinterpret_cast<uintptr_t>(&marker) < stack_limit_) {
251 // Any further calls to Next or peek will return the illegal token. 250 // Any further calls to Next or peek will return the illegal token.
252 // The current call must return the next token, which might already 251 // The current call must return the next token, which might already
253 // have been peek'ed. 252 // have been peek'ed.
254 stack_overflow_ = true; 253 stack_overflow_ = true;
255 } 254 }
256 } 255 }
257 return scanner()->Next(); 256 return scanner()->Next();
258 } 257 }
259 258
260 void Consume(Token::Value token) { 259 void Consume(Token::Value token) {
(...skipping 1966 matching lines...) Expand 10 before | Expand all | Expand 10 after
2227 parser()->ReportMessage("accessor_get_set"); 2226 parser()->ReportMessage("accessor_get_set");
2228 } 2227 }
2229 *ok = false; 2228 *ok = false;
2230 } 2229 }
2231 } 2230 }
2232 2231
2233 2232
2234 } } // v8::internal 2233 } } // v8::internal
2235 2234
2236 #endif // V8_PREPARSER_H 2235 #endif // V8_PREPARSER_H
OLDNEW
« no previous file with comments | « src/isolate.cc ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698