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

Unified Diff: src/extensions/i18n/collator.h

Issue 148503002: A64: Synchronize with r15545. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/extensions/i18n/break-iterator.js ('k') | src/extensions/i18n/collator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/extensions/i18n/collator.h
diff --git a/src/marking-thread.h b/src/extensions/i18n/collator.h
similarity index 59%
copy from src/marking-thread.h
copy to src/extensions/i18n/collator.h
index 9efa3af13262165972abf179defac6f83fed4ac9..a3991b9ed244afad996cf5d547c17e077010ac60 100644
--- a/src/marking-thread.h
+++ b/src/extensions/i18n/collator.h
@@ -24,48 +24,45 @@
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// limitations under the License.
-#ifndef V8_MARKING_THREAD_H_
-#define V8_MARKING_THREAD_H_
+#ifndef V8_EXTENSIONS_I18N_COLLATOR_H_
+#define V8_EXTENSIONS_I18N_COLLATOR_H_
-#include "atomicops.h"
-#include "flags.h"
-#include "platform.h"
-#include "v8utils.h"
+#include "unicode/uversion.h"
+#include "v8.h"
-#include "spaces.h"
+namespace U_ICU_NAMESPACE {
+class Collator;
+class UnicodeString;
+}
-#include "heap.h"
+namespace v8_i18n {
-namespace v8 {
-namespace internal {
-
-class MarkingThread : public Thread {
+class Collator {
public:
- explicit MarkingThread(Isolate* isolate);
+ static void JSCreateCollator(const v8::FunctionCallbackInfo<v8::Value>& args);
+
+ // Helper methods for various bindings.
+
+ // Unpacks collator object from corresponding JavaScript object.
+ static icu::Collator* UnpackCollator(v8::Handle<v8::Object> obj);
- void Run();
- void Stop();
- void StartMarking();
- void WaitForMarkingThread();
+ // Release memory we allocated for the Collator once the JS object that
+ // holds the pointer gets garbage collected.
+ static void DeleteCollator(v8::Isolate* isolate,
+ v8::Persistent<v8::Object>* object,
+ void* param);
- ~MarkingThread() {
- delete start_marking_semaphore_;
- delete end_marking_semaphore_;
- delete stop_semaphore_;
- }
+ // Compare two strings and returns -1, 0 and 1 depending on
+ // whether string1 is smaller than, equal to or larger than string2.
+ static void JSInternalCompare(
+ const v8::FunctionCallbackInfo<v8::Value>& args);
private:
- Isolate* isolate_;
- Heap* heap_;
- Semaphore* start_marking_semaphore_;
- Semaphore* end_marking_semaphore_;
- Semaphore* stop_semaphore_;
- volatile AtomicWord stop_thread_;
- int id_;
- static Atomic32 id_counter_;
+ Collator() {}
};
-} } // namespace v8::internal
+} // namespace v8_i18n
-#endif // V8_MARKING_THREAD_H_
+#endif // V8_EXTENSIONS_I18N_COLLATOR_H_
« no previous file with comments | « src/extensions/i18n/break-iterator.js ('k') | src/extensions/i18n/collator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698