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

Side by Side Diff: src/globals.h

Issue 8417035: Introduce extended mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed more comments. Created 9 years, 1 month 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/full-codegen.cc ('k') | src/handles.h » ('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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 // ----------------------------------------------------------------------------- 354 // -----------------------------------------------------------------------------
355 // Forward declarations for frequently used classes 355 // Forward declarations for frequently used classes
356 // (sorted alphabetically) 356 // (sorted alphabetically)
357 357
358 class FreeStoreAllocationPolicy; 358 class FreeStoreAllocationPolicy;
359 template <typename T, class P = FreeStoreAllocationPolicy> class List; 359 template <typename T, class P = FreeStoreAllocationPolicy> class List;
360 360
361 // ----------------------------------------------------------------------------- 361 // -----------------------------------------------------------------------------
362 // Declarations for use in both the preparser and the rest of V8. 362 // Declarations for use in both the preparser and the rest of V8.
363 363
364 // The different language modes that V8 implements. ES5 defines two language
365 // modes: an unrestricted mode respectively a strict mode which are indicated by
366 // CLASSIC_MODE respectively STRICT_MODE in the enum. The harmony spec drafts
367 // for the next ES standard specify a new third mode which is called 'extended
368 // mode'. The extended mode is only available if the harmony flag is set. It is
369 // based on the 'strict mode' and adds new functionality to it. This means that
370 // most of the semantics of these two modes coincide.
371 //
372 // In the current draft the term 'base code' is used to refer to code that is
373 // neither in strict nor extended mode. However, the more distinguishing term
374 // 'classic mode' is used in V8 instead to avoid mix-ups.
375
376 enum LanguageMode {
377 CLASSIC_MODE,
378 STRICT_MODE,
379 EXTENDED_MODE
380 };
381
382
364 // The Strict Mode (ECMA-262 5th edition, 4.2.2). 383 // The Strict Mode (ECMA-262 5th edition, 4.2.2).
384 //
385 // This flag is used in the backend to represent the language mode. So far
386 // there is no semantic difference between the strict and the extended mode in
387 // the backend, so both modes are represented by the kStrictMode value.
365 enum StrictModeFlag { 388 enum StrictModeFlag {
366 kNonStrictMode, 389 kNonStrictMode,
367 kStrictMode 390 kStrictMode
368 }; 391 };
369 392
370 393
371 } } // namespace v8::internal 394 } } // namespace v8::internal
372 395
373 #endif // V8_GLOBALS_H_ 396 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « src/full-codegen.cc ('k') | src/handles.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698