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

Side by Side Diff: src/globals.h

Issue 196133017: Experimental parser: merge r19949 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 9 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/global-handles.cc ('k') | src/handles.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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 #elif V8_TARGET_ARCH_ARM 155 #elif V8_TARGET_ARCH_ARM
156 #define V8_TARGET_LITTLE_ENDIAN 1 156 #define V8_TARGET_LITTLE_ENDIAN 1
157 #elif V8_TARGET_ARCH_A64 157 #elif V8_TARGET_ARCH_A64
158 #define V8_TARGET_LITTLE_ENDIAN 1 158 #define V8_TARGET_LITTLE_ENDIAN 1
159 #elif V8_TARGET_ARCH_MIPS 159 #elif V8_TARGET_ARCH_MIPS
160 #define V8_TARGET_LITTLE_ENDIAN 1 160 #define V8_TARGET_LITTLE_ENDIAN 1
161 #else 161 #else
162 #error Unknown target architecture endiannes 162 #error Unknown target architecture endiannes
163 #endif 163 #endif
164 164
165 // Determine whether the architecture uses an out-of-line constant pool.
166 #define V8_OOL_CONSTANT_POOL 0
167
165 // Support for alternative bool type. This is only enabled if the code is 168 // Support for alternative bool type. This is only enabled if the code is
166 // compiled with USE_MYBOOL defined. This catches some nasty type bugs. 169 // compiled with USE_MYBOOL defined. This catches some nasty type bugs.
167 // For instance, 'bool b = "false";' results in b == true! This is a hidden 170 // For instance, 'bool b = "false";' results in b == true! This is a hidden
168 // source of bugs. 171 // source of bugs.
169 // However, redefining the bool type does have some negative impact on some 172 // However, redefining the bool type does have some negative impact on some
170 // platforms. It gives rise to compiler warnings (i.e. with 173 // platforms. It gives rise to compiler warnings (i.e. with
171 // MSVC) in the API header files when mixing code that uses the standard 174 // MSVC) in the API header files when mixing code that uses the standard
172 // bool with code that uses the redefined version. 175 // bool with code that uses the redefined version.
173 // This does not actually belong in the platform code, but needs to be 176 // This does not actually belong in the platform code, but needs to be
174 // defined here because the platform code uses bool, and platform.h is 177 // defined here because the platform code uses bool, and platform.h is
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 // ----------------------------------------------------------------------------- 403 // -----------------------------------------------------------------------------
401 // Forward declarations for frequently used classes 404 // Forward declarations for frequently used classes
402 // (sorted alphabetically) 405 // (sorted alphabetically)
403 406
404 class FreeStoreAllocationPolicy; 407 class FreeStoreAllocationPolicy;
405 template <typename T, class P = FreeStoreAllocationPolicy> class List; 408 template <typename T, class P = FreeStoreAllocationPolicy> class List;
406 409
407 // ----------------------------------------------------------------------------- 410 // -----------------------------------------------------------------------------
408 // Declarations for use in both the preparser and the rest of V8. 411 // Declarations for use in both the preparser and the rest of V8.
409 412
410 // The different language modes that V8 implements. ES5 defines two language 413 // The Strict Mode (ECMA-262 5th edition, 4.2.2).
411 // modes: an unrestricted mode respectively a strict mode which are indicated by
412 // CLASSIC_MODE respectively STRICT_MODE in the enum. The harmony spec drafts
413 // for the next ES standard specify a new third mode which is called 'extended
414 // mode'. The extended mode is only available if the harmony flag is set. It is
415 // based on the 'strict mode' and adds new functionality to it. This means that
416 // most of the semantics of these two modes coincide.
417 //
418 // In the current draft the term 'base code' is used to refer to code that is
419 // neither in strict nor extended mode. However, the more distinguishing term
420 // 'classic mode' is used in V8 instead to avoid mix-ups.
421 414
422 enum LanguageMode { 415 enum StrictMode { SLOPPY, STRICT };
423 CLASSIC_MODE,
424 STRICT_MODE,
425 EXTENDED_MODE
426 };
427
428
429 // The Strict Mode (ECMA-262 5th edition, 4.2.2).
430 //
431 // This flag is used in the backend to represent the language mode. So far
432 // there is no semantic difference between the strict and the extended mode in
433 // the backend, so both modes are represented by the kStrictMode value.
434 enum StrictModeFlag {
435 kNonStrictMode,
436 kStrictMode
437 };
438 416
439 417
440 } } // namespace v8::internal 418 } } // namespace v8::internal
441 419
442 #endif // V8_GLOBALS_H_ 420 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « src/global-handles.cc ('k') | src/handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698