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

Side by Side Diff: src/globals.h

Issue 177683002: Mode clean-up pt 1: rename classic/non-strict mode to sloppy mode (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 10 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
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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 // (sorted alphabetically) 396 // (sorted alphabetically)
397 397
398 class FreeStoreAllocationPolicy; 398 class FreeStoreAllocationPolicy;
399 template <typename T, class P = FreeStoreAllocationPolicy> class List; 399 template <typename T, class P = FreeStoreAllocationPolicy> class List;
400 400
401 // ----------------------------------------------------------------------------- 401 // -----------------------------------------------------------------------------
402 // Declarations for use in both the preparser and the rest of V8. 402 // Declarations for use in both the preparser and the rest of V8.
403 403
404 // The different language modes that V8 implements. ES5 defines two language 404 // The different language modes that V8 implements. ES5 defines two language
405 // modes: an unrestricted mode respectively a strict mode which are indicated by 405 // modes: an unrestricted mode respectively a strict mode which are indicated by
406 // CLASSIC_MODE respectively STRICT_MODE in the enum. The harmony spec drafts 406 // SLOPPY_MODE respectively STRICT_MODE in the enum. The harmony spec drafts
407 // for the next ES standard specify a new third mode which is called 'extended 407 // for the next ES standard specify a new third mode which is called 'extended
408 // mode'. The extended mode is only available if the harmony flag is set. It is 408 // mode'. The extended mode is only available if the harmony flag is set. It is
409 // based on the 'strict mode' and adds new functionality to it. This means that 409 // based on the 'strict mode' and adds new functionality to it. This means that
410 // most of the semantics of these two modes coincide. 410 // most of the semantics of these two modes coincide.
411 // 411 // TODO(rossberg): remove extended mode.
Michael Starzinger 2014/02/24 15:09:14 Looking forward to that!
412 // In the current draft the term 'base code' is used to refer to code that is
413 // neither in strict nor extended mode. However, the more distinguishing term
414 // 'classic mode' is used in V8 instead to avoid mix-ups.
415 412
416 enum LanguageMode { 413 enum LanguageMode {
417 CLASSIC_MODE, 414 SLOPPY_MODE,
418 STRICT_MODE, 415 STRICT_MODE,
419 EXTENDED_MODE 416 EXTENDED_MODE
420 }; 417 };
421 418
422 419
423 // The Strict Mode (ECMA-262 5th edition, 4.2.2). 420 // The Strict Mode (ECMA-262 5th edition, 4.2.2).
424 // 421 //
425 // This flag is used in the backend to represent the language mode. So far 422 // This flag is used in the backend to represent the language mode. So far
426 // there is no semantic difference between the strict and the extended mode in 423 // there is no semantic difference between the strict and the extended mode in
427 // the backend, so both modes are represented by the kStrictMode value. 424 // the backend, so both modes are represented by the kStrictMode value.
428 enum StrictModeFlag { 425 enum StrictModeFlag {
429 kNonStrictMode, 426 kSloppyMode,
430 kStrictMode 427 kStrictMode
431 }; 428 };
432 429
433 430
434 } } // namespace v8::internal 431 } } // namespace v8::internal
435 432
436 #endif // V8_GLOBALS_H_ 433 #endif // V8_GLOBALS_H_
OLDNEW
« no previous file with comments | « src/full-codegen.h ('k') | src/harmony-array.js » ('j') | src/preparser.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698