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

Side by Side Diff: include/v8.h

Issue 6580038: [Isolates] Merge from bleeding_edge, revisions 5934-6100. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 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
« no previous file with comments | « build/gyp_v8 ('k') | include/v8-preparser.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 2007-2009 the V8 project authors. All rights reserved. 1 // Copyright 2007-2009 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 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
987 */ 987 */
988 V8EXPORT int Utf8Length() const; 988 V8EXPORT int Utf8Length() const;
989 989
990 /** 990 /**
991 * Write the contents of the string to an external buffer. 991 * Write the contents of the string to an external buffer.
992 * If no arguments are given, expects the buffer to be large 992 * If no arguments are given, expects the buffer to be large
993 * enough to hold the entire string and NULL terminator. Copies 993 * enough to hold the entire string and NULL terminator. Copies
994 * the contents of the string and the NULL terminator into the 994 * the contents of the string and the NULL terminator into the
995 * buffer. 995 * buffer.
996 * 996 *
997 * WriteUtf8 will not write partial UTF-8 sequences, preferring to stop
998 * before the end of the buffer.
999 *
997 * Copies up to length characters into the output buffer. 1000 * Copies up to length characters into the output buffer.
998 * Only null-terminates if there is enough space in the buffer. 1001 * Only null-terminates if there is enough space in the buffer.
999 * 1002 *
1000 * \param buffer The buffer into which the string will be copied. 1003 * \param buffer The buffer into which the string will be copied.
1001 * \param start The starting position within the string at which 1004 * \param start The starting position within the string at which
1002 * copying begins. 1005 * copying begins.
1003 * \param length The number of bytes to copy from the string. 1006 * \param length The number of characters to copy from the string. For
1007 * WriteUtf8 the number of bytes in the buffer.
1004 * \param nchars_ref The number of characters written, can be NULL. 1008 * \param nchars_ref The number of characters written, can be NULL.
1005 * \param hints Various hints that might affect performance of this or 1009 * \param hints Various hints that might affect performance of this or
1006 * subsequent operations. 1010 * subsequent operations.
1007 * \return The number of bytes copied to the buffer 1011 * \return The number of characters copied to the buffer excluding the null
1008 * excluding the NULL terminator. 1012 * terminator. For WriteUtf8: The number of bytes copied to the buffer
1013 * including the null terminator.
1009 */ 1014 */
1010 enum WriteHints { 1015 enum WriteHints {
1011 NO_HINTS = 0, 1016 NO_HINTS = 0,
1012 HINT_MANY_WRITES_EXPECTED = 1 1017 HINT_MANY_WRITES_EXPECTED = 1
1013 }; 1018 };
1014 1019
1015 V8EXPORT int Write(uint16_t* buffer, 1020 V8EXPORT int Write(uint16_t* buffer,
1016 int start = 0, 1021 int start = 0,
1017 int length = -1, 1022 int length = -1,
1018 WriteHints hints = NO_HINTS) const; // UTF-16 1023 WriteHints hints = NO_HINTS) const; // UTF-16
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 public: 1350 public:
1346 V8EXPORT static Local<Value> New(double time); 1351 V8EXPORT static Local<Value> New(double time);
1347 1352
1348 /** 1353 /**
1349 * A specialization of Value::NumberValue that is more efficient 1354 * A specialization of Value::NumberValue that is more efficient
1350 * because we know the structure of this object. 1355 * because we know the structure of this object.
1351 */ 1356 */
1352 V8EXPORT double NumberValue() const; 1357 V8EXPORT double NumberValue() const;
1353 1358
1354 static inline Date* Cast(v8::Value* obj); 1359 static inline Date* Cast(v8::Value* obj);
1360
1361 /**
1362 * Notification that the embedder has changed the time zone,
1363 * daylight savings time, or other date / time configuration
1364 * parameters. V8 keeps a cache of various values used for
1365 * date / time computation. This notification will reset
1366 * those cached values for the current context so that date /
1367 * time configuration changes would be reflected in the Date
1368 * object.
1369 *
1370 * This API should not be called more than needed as it will
1371 * negatively impact the performance of date operations.
1372 */
1373 V8EXPORT static void DateTimeConfigurationChangeNotification();
1374
1355 private: 1375 private:
1356 V8EXPORT static void CheckCast(v8::Value* obj); 1376 V8EXPORT static void CheckCast(v8::Value* obj);
1357 }; 1377 };
1358 1378
1359 1379
1360 /** 1380 /**
1361 * An instance of the built-in RegExp constructor (ECMA-262, 15.10). 1381 * An instance of the built-in RegExp constructor (ECMA-262, 15.10).
1362 */ 1382 */
1363 class RegExp : public Value { 1383 class RegExp : public Value {
1364 public: 1384 public:
(...skipping 2006 matching lines...) Expand 10 before | Expand all | Expand 10 after
3371 virtual OutputEncoding GetOutputEncoding() { return kAscii; } 3391 virtual OutputEncoding GetOutputEncoding() { return kAscii; }
3372 /** 3392 /**
3373 * Writes the next chunk of snapshot data into the stream. Writing 3393 * Writes the next chunk of snapshot data into the stream. Writing
3374 * can be stopped by returning kAbort as function result. EndOfStream 3394 * can be stopped by returning kAbort as function result. EndOfStream
3375 * will not be called in case writing was aborted. 3395 * will not be called in case writing was aborted.
3376 */ 3396 */
3377 virtual WriteResult WriteAsciiChunk(char* data, int size) = 0; 3397 virtual WriteResult WriteAsciiChunk(char* data, int size) = 0;
3378 }; 3398 };
3379 3399
3380 3400
3401 /**
3402 * An interface for reporting progress and controlling long-running
3403 * activities.
3404 */
3405 class V8EXPORT ActivityControl { // NOLINT
3406 public:
3407 enum ControlOption {
3408 kContinue = 0,
3409 kAbort = 1
3410 };
3411 virtual ~ActivityControl() {}
3412 /**
3413 * Notify about current progress. The activity can be stopped by
3414 * returning kAbort as the callback result.
3415 */
3416 virtual ControlOption ReportProgressValue(int done, int total) = 0;
3417 };
3418
3381 3419
3382 // --- I m p l e m e n t a t i o n --- 3420 // --- I m p l e m e n t a t i o n ---
3383 3421
3384 3422
3385 namespace internal { 3423 namespace internal {
3386 3424
3387 static const int kApiPointerSize = sizeof(void*); // NOLINT 3425 static const int kApiPointerSize = sizeof(void*); // NOLINT
3388 static const int kApiIntSize = sizeof(int); // NOLINT 3426 static const int kApiIntSize = sizeof(int); // NOLINT
3389 3427
3390 // Tag information for HeapObject. 3428 // Tag information for HeapObject.
(...skipping 463 matching lines...) Expand 10 before | Expand all | Expand 10 after
3854 3892
3855 3893
3856 } // namespace v8 3894 } // namespace v8
3857 3895
3858 3896
3859 #undef V8EXPORT 3897 #undef V8EXPORT
3860 #undef TYPE_CHECK 3898 #undef TYPE_CHECK
3861 3899
3862 3900
3863 #endif // V8_H_ 3901 #endif // V8_H_
OLDNEW
« no previous file with comments | « build/gyp_v8 ('k') | include/v8-preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698