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

Side by Side Diff: include/v8.h

Issue 6062002: Merge 6006:6095 from bleeding_edge to experimental/gc branch. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 10 years 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 | « SConstruct ('k') | src/SConscript » ('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 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
985 */ 985 */
986 V8EXPORT int Utf8Length() const; 986 V8EXPORT int Utf8Length() const;
987 987
988 /** 988 /**
989 * Write the contents of the string to an external buffer. 989 * Write the contents of the string to an external buffer.
990 * If no arguments are given, expects the buffer to be large 990 * If no arguments are given, expects the buffer to be large
991 * enough to hold the entire string and NULL terminator. Copies 991 * enough to hold the entire string and NULL terminator. Copies
992 * the contents of the string and the NULL terminator into the 992 * the contents of the string and the NULL terminator into the
993 * buffer. 993 * buffer.
994 * 994 *
995 * WriteUtf8 will not write partial UTF-8 sequences, preferring to stop
996 * before the end of the buffer.
997 *
995 * Copies up to length characters into the output buffer. 998 * Copies up to length characters into the output buffer.
996 * Only null-terminates if there is enough space in the buffer. 999 * Only null-terminates if there is enough space in the buffer.
997 * 1000 *
998 * \param buffer The buffer into which the string will be copied. 1001 * \param buffer The buffer into which the string will be copied.
999 * \param start The starting position within the string at which 1002 * \param start The starting position within the string at which
1000 * copying begins. 1003 * copying begins.
1001 * \param length The number of bytes to copy from the string. 1004 * \param length The number of characters to copy from the string. For
1005 * WriteUtf8 the number of bytes in the buffer.
1002 * \param nchars_ref The number of characters written, can be NULL. 1006 * \param nchars_ref The number of characters written, can be NULL.
1003 * \param hints Various hints that might affect performance of this or 1007 * \param hints Various hints that might affect performance of this or
1004 * subsequent operations. 1008 * subsequent operations.
1005 * \return The number of bytes copied to the buffer 1009 * \return The number of characters copied to the buffer excluding the null
1006 * excluding the NULL terminator. 1010 * terminator. For WriteUtf8: The number of bytes copied to the buffer
1011 * including the null terminator.
1007 */ 1012 */
1008 enum WriteHints { 1013 enum WriteHints {
1009 NO_HINTS = 0, 1014 NO_HINTS = 0,
1010 HINT_MANY_WRITES_EXPECTED = 1 1015 HINT_MANY_WRITES_EXPECTED = 1
1011 }; 1016 };
1012 1017
1013 V8EXPORT int Write(uint16_t* buffer, 1018 V8EXPORT int Write(uint16_t* buffer,
1014 int start = 0, 1019 int start = 0,
1015 int length = -1, 1020 int length = -1,
1016 WriteHints hints = NO_HINTS) const; // UTF-16 1021 WriteHints hints = NO_HINTS) const; // UTF-16
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 public: 1348 public:
1344 V8EXPORT static Local<Value> New(double time); 1349 V8EXPORT static Local<Value> New(double time);
1345 1350
1346 /** 1351 /**
1347 * A specialization of Value::NumberValue that is more efficient 1352 * A specialization of Value::NumberValue that is more efficient
1348 * because we know the structure of this object. 1353 * because we know the structure of this object.
1349 */ 1354 */
1350 V8EXPORT double NumberValue() const; 1355 V8EXPORT double NumberValue() const;
1351 1356
1352 static inline Date* Cast(v8::Value* obj); 1357 static inline Date* Cast(v8::Value* obj);
1358
1359 /**
1360 * Notification that the embedder has changed the time zone,
1361 * daylight savings time, or other date / time configuration
1362 * parameters. V8 keeps a cache of various values used for
1363 * date / time computation. This notification will reset
1364 * those cached values for the current context so that date /
1365 * time configuration changes would be reflected in the Date
1366 * object.
1367 *
1368 * This API should not be called more than needed as it will
1369 * negatively impact the performance of date operations.
1370 */
1371 V8EXPORT static void DateTimeConfigurationChangeNotification();
1372
1353 private: 1373 private:
1354 V8EXPORT static void CheckCast(v8::Value* obj); 1374 V8EXPORT static void CheckCast(v8::Value* obj);
1355 }; 1375 };
1356 1376
1357 1377
1358 /** 1378 /**
1359 * An instance of the built-in RegExp constructor (ECMA-262, 15.10). 1379 * An instance of the built-in RegExp constructor (ECMA-262, 15.10).
1360 */ 1380 */
1361 class RegExp : public Value { 1381 class RegExp : public Value {
1362 public: 1382 public:
(...skipping 2399 matching lines...) Expand 10 before | Expand all | Expand 10 after
3762 3782
3763 3783
3764 } // namespace v8 3784 } // namespace v8
3765 3785
3766 3786
3767 #undef V8EXPORT 3787 #undef V8EXPORT
3768 #undef TYPE_CHECK 3788 #undef TYPE_CHECK
3769 3789
3770 3790
3771 #endif // V8_H_ 3791 #endif // V8_H_
OLDNEW
« no previous file with comments | « SConstruct ('k') | src/SConscript » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698