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

Side by Side Diff: src/globals.h

Issue 17468003: Use AST's type field and merge types for unary, binary & compare ICs (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Comments Created 7 years, 6 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/code-stubs.h ('k') | src/hydrogen.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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 // neither in strict nor extended mode. However, the more distinguishing term 392 // neither in strict nor extended mode. However, the more distinguishing term
393 // 'classic mode' is used in V8 instead to avoid mix-ups. 393 // 'classic mode' is used in V8 instead to avoid mix-ups.
394 394
395 enum LanguageMode { 395 enum LanguageMode {
396 CLASSIC_MODE, 396 CLASSIC_MODE,
397 STRICT_MODE, 397 STRICT_MODE,
398 EXTENDED_MODE 398 EXTENDED_MODE
399 }; 399 };
400 400
401 401
402 // A simple Maybe type, that can be passed by value.
403 template<class T>
404 struct Maybe {
405 Maybe() : has_value(false) {}
406 explicit Maybe(T t) : has_value(true), value(t) {}
407 Maybe(bool has, T t) : has_value(has), value(t) {}
408
409 bool has_value;
410 T value;
411 };
412
413
402 // The Strict Mode (ECMA-262 5th edition, 4.2.2). 414 // The Strict Mode (ECMA-262 5th edition, 4.2.2).
403 // 415 //
404 // This flag is used in the backend to represent the language mode. So far 416 // This flag is used in the backend to represent the language mode. So far
405 // there is no semantic difference between the strict and the extended mode in 417 // there is no semantic difference between the strict and the extended mode in
406 // the backend, so both modes are represented by the kStrictMode value. 418 // the backend, so both modes are represented by the kStrictMode value.
407 enum StrictModeFlag { 419 enum StrictModeFlag {
408 kNonStrictMode, 420 kNonStrictMode,
409 kStrictMode 421 kStrictMode
410 }; 422 };
411 423
412 424
413 } } // namespace v8::internal 425 } } // namespace v8::internal
414 426
415 #endif // V8_GLOBALS_H_ 427 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698